Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added params property type for node.status #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion node-red-types/func.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ declare const promisify:typeof import('util').promisify
* @property {string} [fill] The fill property can be: red, green, yellow, blue or grey.
* @property {string} [shape] The shape property can be: ring or dot.
* @property {string} [text] The text to display
* @property {Record<string,string|boolean|number>} [params] The parameters for translation
*/
interface NodeStatus {
/** The fill property can be: red, green, yellow, blue or grey */
Expand All @@ -27,6 +28,8 @@ interface NodeStatus {
shape?: string,
/** The text to display */
text?: string|boolean|number
/** The parameters for translation */
params?: Record<string,string|boolean|number>
}

declare class node {
Expand All @@ -46,7 +49,7 @@ declare class node {
/** Log an info message to the console (not sent to sidebar)' */
static log(info:string|object);
/** Sets the status icon and text underneath the node.
* @param {NodeStatus} status - The status object `{fill, shape, text}`
* @param {NodeStatus} status - The status object `{fill, shape, text, params}`
* @see node-red documentation [writing-functions: adding-status](https://nodered.org/docs/user-guide/writing-functions#adding-status)
*/
static status(status:NodeStatus);
Expand Down