Skip to content

Commit

Permalink
docs: update specs
Browse files Browse the repository at this point in the history
  • Loading branch information
veinfors committed Mar 20, 2023
1 parent a05605c commit 2c7cb55
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 38 deletions.
63 changes: 36 additions & 27 deletions apis/stardust/api-spec/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,15 @@
}
}
],
"returns": {
"description": "A promise that resolves when the data is fetched.",
"type": "Promise",
"generics": [
{
"type": "void"
}
]
},
"examples": [
"fieldInstance.mount(element);"
]
Expand Down Expand Up @@ -1394,6 +1403,33 @@
}
}
},
"Plugin": {
"description": "An object literal containing meta information about the plugin and a function containing the plugin implementation.",
"stability": "experimental",
"availability": {
"since": "1.2.0"
},
"kind": "interface",
"entries": {
"info": {
"description": "Object that can hold various meta info about the plugin",
"kind": "object",
"entries": {
"name": {
"description": "The name of the plugin",
"type": "string"
}
}
},
"fn": {
"description": "The implementation of the plugin. Input and return value is up to the plugin implementation to decide based on its purpose.",
"type": "function"
}
},
"examples": [
"const plugin = {\n info: {\n name: \"example-plugin\",\n type: \"meta-type\",\n },\n fn: () => {\n // Plugin implementation goes here\n }\n};"
]
},
"Field": {
"kind": "alias",
"items": {
Expand Down Expand Up @@ -1512,33 +1548,6 @@
}
}
},
"Plugin": {
"description": "An object literal containing meta information about the plugin and a function containing the plugin implementation.",
"stability": "experimental",
"availability": {
"since": "1.2.0"
},
"kind": "interface",
"entries": {
"info": {
"description": "Object that can hold various meta info about the plugin",
"kind": "object",
"entries": {
"name": {
"description": "The name of the plugin",
"type": "string"
}
}
},
"fn": {
"description": "The implementation of the plugin. Input and return value is up to the plugin implementation to decide based on its purpose.",
"type": "function"
}
},
"examples": [
"const plugin = {\n info: {\n name: \"example-plugin\",\n type: \"meta-type\",\n },\n fn: () => {\n // Plugin implementation goes here\n }\n};"
]
},
"LoadType": {
"kind": "interface",
"params": [
Expand Down
22 changes: 11 additions & 11 deletions apis/stardust/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ declare namespace stardust {
dense?: boolean;
stateName?: string;
properties?: object;
}): void;
}): Promise<void>;

/**
* Unmounts the field listbox from the DOM.
Expand Down Expand Up @@ -436,6 +436,16 @@ declare namespace stardust {

}

/**
* An object literal containing meta information about the plugin and a function containing the plugin implementation.
*/
interface Plugin {
info: {
name: string;
};
fn: ()=>void;
}

type Field = string | EngineAPI.INxDimension | EngineAPI.INxMeasure | stardust.LibraryField;

/**
Expand Down Expand Up @@ -470,16 +480,6 @@ declare namespace stardust {
type: "dimension" | "measure";
}

/**
* An object literal containing meta information about the plugin and a function containing the plugin implementation.
*/
interface Plugin {
info: {
name: string;
};
fn: ()=>void;
}

interface LoadType {
(type: {
name: string;
Expand Down

0 comments on commit 2c7cb55

Please sign in to comment.