本文整理匯總了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)) }), []);