mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-19 17:58:43 -05:00
fix: add return type for viz.destroy (#1744)
* fix: add return type for viz.destroy * chore: type to void
This commit is contained in:
@@ -145,6 +145,7 @@ export default function viz({
|
||||
model,
|
||||
/**
|
||||
* Destroys the visualization and removes it from the the DOM.
|
||||
* @returns {Promise<void>}
|
||||
* @example
|
||||
* const viz = await embed(app).render({
|
||||
* element,
|
||||
|
||||
@@ -1352,6 +1352,14 @@
|
||||
"description": "Destroys the visualization and removes it from the the DOM.",
|
||||
"kind": "function",
|
||||
"params": [],
|
||||
"returns": {
|
||||
"type": "Promise",
|
||||
"generics": [
|
||||
{
|
||||
"type": "void"
|
||||
}
|
||||
]
|
||||
},
|
||||
"examples": [
|
||||
"const viz = await embed(app).render({\n element,\n id: 'abc'\n});\nviz.destroy();"
|
||||
]
|
||||
@@ -1730,6 +1738,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": {
|
||||
@@ -1881,33 +1916,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": [
|
||||
|
||||
22
apis/stardust/types/index.d.ts
vendored
22
apis/stardust/types/index.d.ts
vendored
@@ -430,7 +430,7 @@ declare namespace stardust {
|
||||
/**
|
||||
* Destroys the visualization and removes it from the the DOM.
|
||||
*/
|
||||
destroy(): void;
|
||||
destroy(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Converts the visualization to a different registered type.
|
||||
@@ -559,6 +559,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 | qix.NxDimension | qix.NxMeasure | stardust.LibraryField;
|
||||
|
||||
/**
|
||||
@@ -600,16 +610,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;
|
||||
|
||||
Reference in New Issue
Block a user