Remove SchemaUID from the strapi/strapi ts utils

This commit is contained in:
Convly 2023-05-17 12:26:02 +02:00
parent e0b3603447
commit c1a3193a83

View File

@ -107,26 +107,6 @@ export type PickBy<T, U> = Pick<T, KeysBy<T, U>>;
*/
export type NeverGuard<T, U = unknown> = [T] extends [never] ? U : T;
/**
* Dynamic type based on the keys of `Strapi.Schemas`.
* It represents all the registered schemas' UID as a union type.
*
* @example
*
* declare global {
* namespace Strapi {
* interface Schemas {
* 'api::foo.foo': CollectionTypeSchema;
* 'api::bar.bar': ComponentSchema;
* }
* }
* }
*
* type X = SchemaUID;
* // 'api::foo.foo' | 'api::bar.bar'
*/
export type SchemaUID = keyof Strapi.Schemas;
/**
* Get the type of a specific key `U` in `T`
*