本文整理汇总了TypeScript中wherehows-web/utils/validators/urn.encodeUrn函数的典型用法代码示例。如果您正苦于以下问题:TypeScript encodeUrn函数的具体用法?TypeScript encodeUrn怎么用?TypeScript encodeUrn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了encodeUrn函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: async
const readDatasetByUrn = async (urn: string = ''): Promise<IDatasetView> => {
const { dataset } = await getJSON<Pick<IDatasetViewGetResponse, 'dataset'>>({ url: datasetUrlByUrn(encodeUrn(urn)) });
return dataset!;
};
示例2:
const datasetRetentionUrlByUrn = (urn: string): string => `${datasetUrlByUrn(encodeUrn(urn))}/retention`;
示例3: datasetFabricsUrlByUrn
const readDatasetFabricsByUrn = (urn: string): Promise<Array<Fabric>> =>
getJSON<Array<Fabric>>({ url: datasetFabricsUrlByUrn(encodeUrn(urn)) });
示例4: async
const datasetWithComplianceMetadata = async ({
uri,
nativeName
}: Pick<IDatasetView, 'uri' | 'nativeName'>): Promise<IUpstreamWithComplianceMetadata> => {
const { isNewComplianceInfo }: IReadComplianceResult = await readDatasetComplianceByUrn(encodeUrn(uri));
return { urn: uri, hasCompliance: !isNewComplianceInfo, nativeName };
};
示例5: returnDefaultIfNotFound
const readDownstreamDatasetsByUrn = (urn: string): Promise<LineageList> =>
returnDefaultIfNotFound(getJSON<LineageList>({ url: datasetDownstreamUrlByUrn(encodeUrn(urn)) }), []);