Skip to content

Commit

Permalink
fix: add emitter to types
Browse files Browse the repository at this point in the history
  • Loading branch information
Caele committed Mar 30, 2023
1 parent 9ca11fe commit db7b752
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 37 deletions.
3 changes: 3 additions & 0 deletions apis/stardust/api-spec/spec.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ module.exports = {
'EngineAPI.INxMeasure': {
url: 'https://qlik.dev/apis/json-rpc/qix/schemas#%23%2Fdefinitions%2Fschemas%2Fentries%2FNxMeasure',
},
Emitter: {
url: 'https://nodejs.org/api/events.html#class-eventemitter',
},
},
},
},
Expand Down
54 changes: 27 additions & 27 deletions apis/stardust/api-spec/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,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 @@ -1570,33 +1597,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
20 changes: 10 additions & 10 deletions apis/stardust/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,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 @@ -489,16 +499,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 db7b752

Please sign in to comment.