From 3b81225ba389fec31f1643fb12da56aaae33ce13 Mon Sep 17 00:00:00 2001 From: Matthew Giannini Date: Fri, 8 Mar 2024 08:39:55 -0500 Subject: [PATCH] nodeJs: write static type$ field in d.ts file --- src/nodeJs/fan/ts/CompileTsPlugin.fan | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nodeJs/fan/ts/CompileTsPlugin.fan b/src/nodeJs/fan/ts/CompileTsPlugin.fan index 6b36efdd3..b068000be 100644 --- a/src/nodeJs/fan/ts/CompileTsPlugin.fan +++ b/src/nodeJs/fan/ts/CompileTsPlugin.fan @@ -92,6 +92,12 @@ class CompileTsPlugin : CompilerStep } // Write fields + if (true) + { + // write .type$ field for use in TypeScript + t := getNamespacedType("Type", "sys", this.pod) + out.print(" static type\$: ${t}\n") + } fields := type.fields.findAll |field| { field.isPublic &&