mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #3371 from node-red/node-alias
Add _path property to nodes and expose as node.path in Function node
This commit is contained in:
@@ -31,12 +31,12 @@ interface NodeStatus {
|
||||
}
|
||||
|
||||
declare class node {
|
||||
/**
|
||||
* Send 1 or more messages asynchronously
|
||||
* @param {object | object[]} msg The msg object
|
||||
* @param {Boolean} [clone=true] Flag to indicate the `msg` should be cloned. Default = `true`
|
||||
* @see node-red documentation [writing-functions: sending messages asynchronously](https://nodered.org/docs/user-guide/writing-functions#sending-messages-asynchronously)
|
||||
*/
|
||||
/**
|
||||
* Send 1 or more messages asynchronously
|
||||
* @param {object | object[]} msg The msg object
|
||||
* @param {Boolean} [clone=true] Flag to indicate the `msg` should be cloned. Default = `true`
|
||||
* @see node-red documentation [writing-functions: sending messages asynchronously](https://nodered.org/docs/user-guide/writing-functions#sending-messages-asynchronously)
|
||||
*/
|
||||
static send(msg:object|object[], clone?:Boolean): void;
|
||||
/** Inform runtime this instance has completed its operation */
|
||||
static done();
|
||||
@@ -60,6 +60,8 @@ declare class node {
|
||||
public readonly id:string;
|
||||
/** the name of this node */
|
||||
public readonly name:string;
|
||||
/** the path identifier for this node */
|
||||
public readonly path:string;
|
||||
/** the number of outputs of this node */
|
||||
public readonly outputCount:number;
|
||||
}
|
||||
@@ -93,27 +95,27 @@ declare class context {
|
||||
/**
|
||||
* Set one or multiple values in context (synchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[]);
|
||||
/**
|
||||
* Set one or multiple values in context (asynchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param callback - (optional) Callback function (`(err) => {}`)
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], callback?: Function);
|
||||
/**
|
||||
* Set one or multiple values in context (synchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param store - (optional) Name of context store
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], store?: string);
|
||||
/**
|
||||
* Set one or multiple values in context (asynchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param store - (optional) Name of context store
|
||||
* @param callback - (optional) Callback function (`(err) => {}`)
|
||||
*/
|
||||
@@ -158,27 +160,27 @@ declare class flow {
|
||||
/**
|
||||
* Set one or multiple values in context (synchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[]);
|
||||
/**
|
||||
* Set one or multiple values in context (asynchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param callback - (optional) Callback function (`(err) => {}`)
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], callback?: Function);
|
||||
/**
|
||||
* Set one or multiple values in context (synchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param store - (optional) Name of context store
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], store?: string);
|
||||
/**
|
||||
* Set one or multiple values in context (asynchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param store - (optional) Name of context store
|
||||
* @param callback - (optional) Callback function (`(err) => {}`)
|
||||
*/
|
||||
@@ -225,32 +227,32 @@ declare class global {
|
||||
/**
|
||||
* Set one or multiple values in context (synchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[]);
|
||||
/**
|
||||
* Set one or multiple values in context (asynchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param callback - (optional) Callback function (`(err) => {}`)
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], callback?: Function);
|
||||
/**
|
||||
* Set one or multiple values in context (synchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param store - (optional) Name of context store
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], store?: string);
|
||||
/**
|
||||
* Set one or multiple values in context (asynchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param store - (optional) Name of context store
|
||||
* @param callback - (optional) Callback function (`(err) => {}`)
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], store?: string, callback?: Function);
|
||||
|
||||
|
||||
/** Get an array of the keys in the context store */
|
||||
static keys(): Array<string>;
|
||||
/** Get an array of the keys in the context store */
|
||||
|
Reference in New Issue
Block a user