feat: jsdocs for generated types, by using admin.description (#9917)
This makes use of admin.description to generate JSDocs for field,
collection and global generated types.


For the future, we should add a dedicated property to override these
JSDocs.
You can view the effect of this PR on our test suite generated types
here:
05f552bbbc
This commit is contained in:
@@ -135,6 +135,9 @@ export interface Page {
|
||||
} | null);
|
||||
url?: string | null;
|
||||
label: string;
|
||||
/**
|
||||
* Choose how the link should be rendered.
|
||||
*/
|
||||
appearance?: ('primary' | 'secondary') | null;
|
||||
};
|
||||
id?: string | null;
|
||||
@@ -169,6 +172,9 @@ export interface Page {
|
||||
} | null);
|
||||
url?: string | null;
|
||||
label: string;
|
||||
/**
|
||||
* Choose how the link should be rendered.
|
||||
*/
|
||||
appearance?: ('default' | 'primary' | 'secondary') | null;
|
||||
};
|
||||
id?: string | null;
|
||||
@@ -202,12 +208,18 @@ export interface Page {
|
||||
value: string | Post;
|
||||
}[]
|
||||
| null;
|
||||
/**
|
||||
* This field is auto-populated after-read
|
||||
*/
|
||||
populatedDocs?:
|
||||
| {
|
||||
relationTo: 'posts';
|
||||
value: string | Post;
|
||||
}[]
|
||||
| null;
|
||||
/**
|
||||
* This field is auto-populated after-read
|
||||
*/
|
||||
populatedDocsTotal?: number | null;
|
||||
id?: string | null;
|
||||
blockName?: string | null;
|
||||
@@ -367,6 +379,9 @@ export interface Post {
|
||||
} | null);
|
||||
url?: string | null;
|
||||
label: string;
|
||||
/**
|
||||
* Choose how the link should be rendered.
|
||||
*/
|
||||
appearance?: ('primary' | 'secondary') | null;
|
||||
};
|
||||
id?: string | null;
|
||||
@@ -401,6 +416,9 @@ export interface Post {
|
||||
} | null);
|
||||
url?: string | null;
|
||||
label: string;
|
||||
/**
|
||||
* Choose how the link should be rendered.
|
||||
*/
|
||||
appearance?: ('default' | 'primary' | 'secondary') | null;
|
||||
};
|
||||
id?: string | null;
|
||||
@@ -434,12 +452,18 @@ export interface Post {
|
||||
value: string | Post;
|
||||
}[]
|
||||
| null;
|
||||
/**
|
||||
* This field is auto-populated after-read
|
||||
*/
|
||||
populatedDocs?:
|
||||
| {
|
||||
relationTo: 'posts';
|
||||
value: string | Post;
|
||||
}[]
|
||||
| null;
|
||||
/**
|
||||
* This field is auto-populated after-read
|
||||
*/
|
||||
populatedDocsTotal?: number | null;
|
||||
id?: string | null;
|
||||
blockName?: string | null;
|
||||
@@ -510,6 +534,9 @@ export interface Ssr {
|
||||
} | null);
|
||||
url?: string | null;
|
||||
label: string;
|
||||
/**
|
||||
* Choose how the link should be rendered.
|
||||
*/
|
||||
appearance?: ('primary' | 'secondary') | null;
|
||||
};
|
||||
id?: string | null;
|
||||
@@ -544,6 +571,9 @@ export interface Ssr {
|
||||
} | null);
|
||||
url?: string | null;
|
||||
label: string;
|
||||
/**
|
||||
* Choose how the link should be rendered.
|
||||
*/
|
||||
appearance?: ('default' | 'primary' | 'secondary') | null;
|
||||
};
|
||||
id?: string | null;
|
||||
@@ -577,12 +607,18 @@ export interface Ssr {
|
||||
value: string | Post;
|
||||
}[]
|
||||
| null;
|
||||
/**
|
||||
* This field is auto-populated after-read
|
||||
*/
|
||||
populatedDocs?:
|
||||
| {
|
||||
relationTo: 'posts';
|
||||
value: string | Post;
|
||||
}[]
|
||||
| null;
|
||||
/**
|
||||
* This field is auto-populated after-read
|
||||
*/
|
||||
populatedDocsTotal?: number | null;
|
||||
id?: string | null;
|
||||
blockName?: string | null;
|
||||
@@ -641,6 +677,9 @@ export interface SsrAutosave {
|
||||
} | null);
|
||||
url?: string | null;
|
||||
label: string;
|
||||
/**
|
||||
* Choose how the link should be rendered.
|
||||
*/
|
||||
appearance?: ('primary' | 'secondary') | null;
|
||||
};
|
||||
id?: string | null;
|
||||
@@ -675,6 +714,9 @@ export interface SsrAutosave {
|
||||
} | null);
|
||||
url?: string | null;
|
||||
label: string;
|
||||
/**
|
||||
* Choose how the link should be rendered.
|
||||
*/
|
||||
appearance?: ('default' | 'primary' | 'secondary') | null;
|
||||
};
|
||||
id?: string | null;
|
||||
@@ -708,12 +750,18 @@ export interface SsrAutosave {
|
||||
value: string | Post;
|
||||
}[]
|
||||
| null;
|
||||
/**
|
||||
* This field is auto-populated after-read
|
||||
*/
|
||||
populatedDocs?:
|
||||
| {
|
||||
relationTo: 'posts';
|
||||
value: string | Post;
|
||||
}[]
|
||||
| null;
|
||||
/**
|
||||
* This field is auto-populated after-read
|
||||
*/
|
||||
populatedDocsTotal?: number | null;
|
||||
id?: string | null;
|
||||
blockName?: string | null;
|
||||
@@ -1345,6 +1393,9 @@ export interface Header {
|
||||
} | null);
|
||||
url?: string | null;
|
||||
label: string;
|
||||
/**
|
||||
* Choose how the link should be rendered.
|
||||
*/
|
||||
appearance?: ('default' | 'primary' | 'secondary') | null;
|
||||
};
|
||||
id?: string | null;
|
||||
@@ -1375,6 +1426,9 @@ export interface Footer {
|
||||
} | null);
|
||||
url?: string | null;
|
||||
label: string;
|
||||
/**
|
||||
* Choose how the link should be rendered.
|
||||
*/
|
||||
appearance?: ('default' | 'primary' | 'secondary') | null;
|
||||
};
|
||||
id?: string | null;
|
||||
|
||||
Reference in New Issue
Block a user