Fixed DTS for registered_node_types, node_types_by_file_extension, and Nodes in LiteGraph to properly take LGraphNodeConstructor instead of LGraphNode.

This commit is contained in:
Julien MOREAU-MATHIS
2019-12-03 18:17:27 +01:00
parent 4e47b90197
commit cfe7cc1bdb

6
src/litegraph.d.ts vendored
View File

@@ -209,11 +209,11 @@ export const LiteGraph: {
/** if set to true some nodes like Formula would be allowed to evaluate code that comes from unsafe sources (like node configuration), which could lead to exploits */
allow_scripts: boolean;
/** node types by string */
registered_node_types: Record<string, LGraphNode>;
registered_node_types: Record<string, LGraphNodeConstructor>;
/** used for dropping files in the canvas */
node_types_by_file_extension: Record<string, LGraphNode>;
node_types_by_file_extension: Record<string, LGraphNodeConstructor>;
/** node types by class name */
Nodes: Record<string, LGraphNode>;
Nodes: Record<string, LGraphNodeConstructor>;
/** used to add extra features to the search box */
searchbox_extras: Record<