UNPKG

@kontent-ai/model-generator

Version:

This utility generates strongly-typed models for Delivery JS SDK, Migration toolkit or just general scripting to improve the experience when referencing Kontent.ai related objects.

11 lines (10 loc) 991 B
export declare function uniqueFilter<T extends string>(value: T, index: number, self: readonly T[]): boolean; export declare const isNotUndefined: <T>(item: T | undefined) => item is T; export declare function getFileNameWithoutExtension(filePath: string): string; export declare function sortAlphabetically<T>(arrayToSort: readonly T[], propertySelector: (item: T) => string): readonly T[]; export declare function getStringOrUndefinedAsPropertyValue(text: string | undefined): string; export declare function toSafePropertyValue(value: string): string; export declare function toOutputDirPath(outputDir: string | undefined): string; export declare function singleItemToArray<T>(item: T | undefined): readonly T[]; export declare function findRequired<T>(array: readonly T[], predicate: (item: T, index: number) => boolean, errorMessage: string): T; export declare function findRequired<T>(array: readonly T[], predicate: (item: T, index: number) => boolean, errorMessage: () => never): T;