create Method
Look up a tool by toolId and, if found, create an instance with the supplied arguments.
create(toolId: string, ...args: any[]): undefined | Tool
@returns an instance of the registered Tool class, or undefined if toolId is not registered.
Parameter | Type | Description |
---|---|---|
toolId | string | the toolId of the tool |
...args | any[] | arguments to pass to the constructor. |
Returns - undefined | Tool
an instance of the registered Tool class, or undefined if toolId is not registered.
Defined in
- core/frontend/src/tools/Tool.ts Line 997
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.