aboutsummaryrefslogtreecommitdiff
path: root/bindings/node/index.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/node/index.d.ts')
-rw-r--r--bindings/node/index.d.ts28
1 files changed, 28 insertions, 0 deletions
diff --git a/bindings/node/index.d.ts b/bindings/node/index.d.ts
new file mode 100644
index 0000000..efe259e
--- /dev/null
+++ b/bindings/node/index.d.ts
@@ -0,0 +1,28 @@
+type BaseNode = {
+ type: string;
+ named: boolean;
+};
+
+type ChildNode = {
+ multiple: boolean;
+ required: boolean;
+ types: BaseNode[];
+};
+
+type NodeInfo =
+ | (BaseNode & {
+ subtypes: BaseNode[];
+ })
+ | (BaseNode & {
+ fields: { [name: string]: ChildNode };
+ children: ChildNode[];
+ });
+
+type Language = {
+ name: string;
+ language: unknown;
+ nodeTypeInfo: NodeInfo[];
+};
+
+declare const language: Language;
+export = language;