Skip to content
Draft
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
13 changes: 10 additions & 3 deletions node-red-types/func.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ declare const __msgid__:string;
declare const util:typeof import('util')
declare const promisify:typeof import('util').promisify

/** Helper type to enable autocomplete of String */
type AnyString = (string & {});

/**
* @typedef NodeStatus
* @type {object}
Expand All @@ -22,11 +25,15 @@ declare const promisify:typeof import('util').promisify
*/
interface NodeStatus {
/** The fill property can be: red, green, yellow, blue or grey */
fill?: 'red'|'green'|'yellow'|'blue'|'grey'|string,
fill?: 'red'|'green'|'yellow'|'blue'|'grey'|AnyString;
/** The shape property can be: ring or dot */
shape?: 'ring'|'dot'|string,
shape?: 'ring'|'dot'|AnyString;
/** The text to display */
text?: string|boolean|number
text?: string|boolean|number;
/** Delay in milliseconds before clearing the status or restoring the previous non visual status if `ephemeral` is enabled. */
duration?: number;
/** If enabled, the status is visual only; it will not trigger `Status` nodes. Default `duration` 5s. */
ephemeral?: boolean;
}

declare class node {
Expand Down