feat(editor): Autocomplete info box: improve structure and add examples (#9019)
Co-authored-by: Giulio Andreini <andreini@netseven.it>
This commit is contained in:
@@ -12,6 +12,20 @@ export type NativeDoc = {
|
||||
functions: Record<string, { doc?: DocMetadata }>;
|
||||
};
|
||||
|
||||
export type DocMetadataArgument = {
|
||||
name: string;
|
||||
type?: string;
|
||||
optional?: boolean;
|
||||
variadic?: boolean;
|
||||
description?: string;
|
||||
default?: string;
|
||||
};
|
||||
export type DocMetadataExample = {
|
||||
example: string;
|
||||
evaluated?: string;
|
||||
description?: string;
|
||||
};
|
||||
|
||||
export type DocMetadata = {
|
||||
name: string;
|
||||
returnType: string;
|
||||
@@ -19,6 +33,7 @@ export type DocMetadata = {
|
||||
section?: string;
|
||||
hidden?: boolean;
|
||||
aliases?: string[];
|
||||
args?: Array<{ name: string; type?: string }>;
|
||||
args?: DocMetadataArgument[];
|
||||
examples?: DocMetadataExample[];
|
||||
docURL?: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user