@defold-typescript/transpiler 0.18.5 → 0.18.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -0
- package/package.json +2 -2
- package/src/transpile.ts +10 -0
package/dist/index.js
CHANGED
|
@@ -624,6 +624,11 @@ export type { ScriptProperties, ScriptProperty } from "./src/lifecycle.js";
|
|
|
624
624
|
files[`node_modules/@defold-typescript/types/generated/${entry}`] = readAmbient(`generated/${entry}`);
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
+
for (const entry of readdirSync(path.join(TYPES_PKG_ROOT, "src"))) {
|
|
628
|
+
if (entry.endsWith(".d.ts")) {
|
|
629
|
+
files[`node_modules/@defold-typescript/types/src/${entry}`] = readAmbient(`src/${entry}`);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
627
632
|
return files;
|
|
628
633
|
}
|
|
629
634
|
var AMBIENT_FILES = buildAmbientFiles();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defold-typescript/transpiler",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.6",
|
|
4
4
|
"description": "TypeScript-to-Lua build pipeline tuned for Defold's runtime.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"test": "bun test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@defold-typescript/types": "0.18.
|
|
38
|
+
"@defold-typescript/types": "0.18.6",
|
|
39
39
|
"@typescript-to-lua/language-extensions": "1.19.0",
|
|
40
40
|
"typescript-to-lua": "^1.36.0"
|
|
41
41
|
}
|
package/src/transpile.ts
CHANGED
|
@@ -165,6 +165,16 @@ function buildAmbientFiles(): Record<string, string> {
|
|
|
165
165
|
);
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
+
// Seed every hand-authored `src/*.d.ts` augmentation (overloads + guards) so
|
|
169
|
+
// the virtual program mirrors index.d.ts's `import "./src/*"` set. Enumerated
|
|
170
|
+
// rather than hard-listed so a new augmentation (e.g. socket-types,
|
|
171
|
+
// vmath-overloads) can't silently drop out of the transpiler surface while
|
|
172
|
+
// still type-checking under the editor's index.d.ts.
|
|
173
|
+
for (const entry of readdirSync(path.join(TYPES_PKG_ROOT, "src"))) {
|
|
174
|
+
if (entry.endsWith(".d.ts")) {
|
|
175
|
+
files[`node_modules/@defold-typescript/types/src/${entry}`] = readAmbient(`src/${entry}`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
168
178
|
return files;
|
|
169
179
|
}
|
|
170
180
|
|