Spaces:
Build error
Build error
File size: 431 Bytes
d9494a5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import { isNonEmptyString } from '@sniptt/guards';
type RecordObjectSchema = {
type?: string;
objectUniversalIdentifier?: string;
};
export const isRecordObjectSchema = <TSchema extends RecordObjectSchema>(
schema: TSchema | null | undefined,
): schema is TSchema & { objectUniversalIdentifier: string } =>
(schema?.type === 'record' || schema?.type === 'object') &&
isNonEmptyString(schema.objectUniversalIdentifier);
|