File tree Expand file tree Collapse file tree 1 file changed +0
-44
lines changed Expand file tree Collapse file tree 1 file changed +0
-44
lines changed Original file line number Diff line number Diff line change 11import type { Strapi as StrapiInterface } from './types/core' ;
2- import type {
3- CollectionTypeSchema ,
4- SingleTypeSchema ,
5- ComponentSchema ,
6- ContentTypeSchema ,
7- } from './types/core/schemas' ;
8- import type { KeysBy } from './types/utils' ;
92
103declare global {
114 namespace Strapi {
12- /**
13- * Map of UID / schemas used as a schemas database for other types.
14- * It must be extended by the user application or plugins.
15- *
16- * @example
17- * ```ts
18- * declare global {
19- * namespace Strapi {
20- * interface Schemas {
21- * 'xxx::xxx.uid: ContentTypeSchema | ComponentSchema;
22- * }
23- * }
24- * }
25- * ```
26- */
27- interface Schemas { }
28-
29- /**
30- * Literal union type of every content type registered in Strapi.Schemas
31- */
32- type ContentTypeUIDs = KeysBy < Schemas , ContentTypeSchema > ;
33-
34- /**
35- * Literal union type of every collection type registered in Strapi.Schemas
36- */
37- type CollectionTypeUIDs = KeysBy < Schemas , CollectionTypeSchema > ;
38-
39- /**
40- * Literal union type of every single type registered in Strapi.Schemas
41- */
42- type SingleTypeUIDs = KeysBy < Schemas , SingleTypeSchema > ;
43-
44- /**
45- * Literal union type of every component registered in Strapi.Schemas
46- */
47- type ComponentUIDs = KeysBy < Schemas , ComponentSchema > ;
48-
495 /**
506 * Global shorthand to access the `StrapiInterface` type
517 */
You can’t perform that action at this time.
0 commit comments