Skip to content

Commit be0de33

Browse files
Matthew GianniniMatthew Giannini
authored andcommitted
build: generate d.ts again for nodeJs target
1 parent 6112308 commit be0de33

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/build/fan/BuildPod.fan

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,16 @@ abstract class BuildPod : BuildScript
453453

454454
Env.cur.homeDir.plus(`lib/js/node_modules/${podName}.js`).out.writeChars(c.js).flush.close
455455
if (c.esm != null)
456+
{
456457
esmDir.plus(`${podName}.js`).out.writeChars(c.esm).flush.close
457-
if (c.tsDecl != null)
458-
esmDir.plus(`${podName}.d.ts`).out.writeChars(c.tsDecl).flush.close
458+
459+
// write ts declarations
460+
t := Type.find("nodeJs::GenTsDecl", false)
461+
if (t == null) return
462+
decl := esmDir.plus(`${podName}.d.ts`).out
463+
t.make([decl, c.pod, ["allTypes":true]])->run
464+
decl.flush.close
465+
}
459466
}
460467
catch (CompilerErr err)
461468
{

0 commit comments

Comments
 (0)