@sitecore/sc-contenthub-webclient-sdk
Version:
Sitecore Content Hub WebClient SDK.
21 lines (20 loc) • 620 B
TypeScript
export declare class TypeGuards {
/**
* A naive type guard to check if we are dealing with a string array.
*
* @remarks
* Only checks if the first element of the array is of type "string".
*
* @param obj - An array
*/
static isStringArray(obj: Array<unknown>): obj is Array<string>;
/**
* A naive type guard to check if we are dealing with a number array.
*
* @remarks
* Only checks if the first element of the array is of type "number".
*
* @param obj - An array
*/
static isNumberArray(obj: Array<unknown>): obj is Array<number>;
}