diff --git a/node-red-types/func.d.ts b/node-red-types/func.d.ts index 703ae53..bcf75c9 100644 --- a/node-red-types/func.d.ts +++ b/node-red-types/func.d.ts @@ -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} @@ -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 {