From 024a3af746e06846e211161dbb2f285e28aca17c Mon Sep 17 00:00:00 2001 From: GogoVega <92022724+GogoVega@users.noreply.github.com> Date: Mon, 27 Oct 2025 20:36:05 +0100 Subject: [PATCH 1/3] Enable autocomplete of String --- node-red-types/func.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/node-red-types/func.d.ts b/node-red-types/func.d.ts index 703ae53..a400c8c 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,9 +25,9 @@ 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 } From eecbe346b8480e16c161839aec24c9ce630b2296 Mon Sep 17 00:00:00 2001 From: GogoVega <92022724+GogoVega@users.noreply.github.com> Date: Mon, 27 Oct 2025 20:37:40 +0100 Subject: [PATCH 2/3] Update `NodeStatus` for `ephemeral` and `duration` props --- node-red-types/func.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/node-red-types/func.d.ts b/node-red-types/func.d.ts index a400c8c..faf5877 100644 --- a/node-red-types/func.d.ts +++ b/node-red-types/func.d.ts @@ -29,7 +29,11 @@ interface NodeStatus { /** The shape property can be: ring or dot */ 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 {@link ephemeral} is enabled */ + duration?: number; + /** If enabled, the status is visual only; it will not trigger `Status` nodes */ + ephemeral?: boolean; } declare class node { From 41a770125c378cdebc0dee5eb3b68f164c5cffbe Mon Sep 17 00:00:00 2001 From: GogoVega <92022724+GogoVega@users.noreply.github.com> Date: Mon, 27 Oct 2025 20:51:12 +0100 Subject: [PATCH 3/3] fix: `@link` doesn't seem to work --- node-red-types/func.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node-red-types/func.d.ts b/node-red-types/func.d.ts index faf5877..bcf75c9 100644 --- a/node-red-types/func.d.ts +++ b/node-red-types/func.d.ts @@ -30,9 +30,9 @@ interface NodeStatus { shape?: 'ring'|'dot'|AnyString; /** The text to display */ text?: string|boolean|number; - /** Delay in milliseconds before clearing the status or restoring the previous non visual status if {@link ephemeral} is enabled */ + /** 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 */ + /** If enabled, the status is visual only; it will not trigger `Status` nodes. Default `duration` 5s. */ ephemeral?: boolean; }