ttsc 0.5.0 → 0.6.0-dev.20250430

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.
Files changed (162) hide show
  1. package/README.md +1 -1
  2. package/go.mod +1 -1
  3. package/go.sum +2 -2
  4. package/lib/api.d.ts +15 -67
  5. package/lib/api.js +14 -3
  6. package/lib/api.js.map +1 -1
  7. package/lib/cli.js.map +1 -1
  8. package/lib/native.d.ts +8 -20
  9. package/lib/native.js.map +1 -1
  10. package/lib/platform.d.ts +7 -25
  11. package/lib/platform.js.map +1 -1
  12. package/lib/plugin.d.ts +13 -41
  13. package/lib/plugin.js +2 -2
  14. package/lib/plugin.js.map +1 -1
  15. package/lib/project.d.ts +11 -29
  16. package/lib/project.js.map +1 -1
  17. package/lib/runner/cli.js.map +1 -1
  18. package/lib/runner/register.d.ts +6 -13
  19. package/lib/runner/register.js.map +1 -1
  20. package/lib/source-build.d.ts +11 -22
  21. package/lib/source-build.js +25 -1
  22. package/lib/source-build.js.map +1 -1
  23. package/lib/structures/ITtscBuildOptions.d.ts +14 -0
  24. package/lib/structures/ITtscBuildOptions.js +3 -0
  25. package/lib/structures/ITtscBuildOptions.js.map +1 -0
  26. package/lib/structures/ITtscBuildResult.d.ts +6 -0
  27. package/lib/structures/ITtscBuildResult.js +3 -0
  28. package/lib/structures/ITtscBuildResult.js.map +1 -0
  29. package/lib/structures/ITtscBuildSourcePluginOptions.d.ts +8 -0
  30. package/lib/structures/ITtscBuildSourcePluginOptions.js +3 -0
  31. package/lib/structures/ITtscBuildSourcePluginOptions.js.map +1 -0
  32. package/lib/structures/ITtscCacheKeyInput.d.ts +7 -0
  33. package/lib/structures/ITtscCacheKeyInput.js +3 -0
  34. package/lib/structures/ITtscCacheKeyInput.js.map +1 -0
  35. package/lib/structures/ITtscCheckOptions.d.ts +2 -0
  36. package/lib/structures/ITtscCheckOptions.js +3 -0
  37. package/lib/structures/ITtscCheckOptions.js.map +1 -0
  38. package/lib/structures/ITtscCommonOptions.d.ts +22 -0
  39. package/lib/structures/ITtscCommonOptions.js +3 -0
  40. package/lib/structures/ITtscCommonOptions.js.map +1 -0
  41. package/lib/structures/ITtscLoadPluginsOptions.d.ts +8 -0
  42. package/lib/structures/ITtscLoadPluginsOptions.js +3 -0
  43. package/lib/structures/ITtscLoadPluginsOptions.js.map +1 -0
  44. package/lib/structures/ITtscLoadedNativePlugin.d.ts +7 -0
  45. package/lib/structures/ITtscLoadedNativePlugin.js +3 -0
  46. package/lib/structures/ITtscLoadedNativePlugin.js.map +1 -0
  47. package/lib/structures/ITtscLoadedPlugins.d.ts +11 -0
  48. package/lib/structures/ITtscLoadedPlugins.js +3 -0
  49. package/lib/structures/ITtscLoadedPlugins.js.map +1 -0
  50. package/lib/structures/ITtscNativeBackend.d.ts +10 -0
  51. package/lib/structures/ITtscNativeBackend.js +3 -0
  52. package/lib/structures/ITtscNativeBackend.js.map +1 -0
  53. package/lib/structures/ITtscNativePluginContractVersion.d.ts +1 -0
  54. package/lib/structures/ITtscNativePluginContractVersion.js +3 -0
  55. package/lib/structures/ITtscNativePluginContractVersion.js.map +1 -0
  56. package/lib/structures/ITtscNativePluginShape.d.ts +8 -0
  57. package/lib/structures/ITtscNativePluginShape.js +3 -0
  58. package/lib/structures/ITtscNativePluginShape.js.map +1 -0
  59. package/lib/structures/ITtscNativeRewriteMode.d.ts +1 -0
  60. package/lib/structures/ITtscNativeRewriteMode.js +3 -0
  61. package/lib/structures/ITtscNativeRewriteMode.js.map +1 -0
  62. package/lib/structures/ITtscNativeSource.d.ts +4 -0
  63. package/lib/structures/ITtscNativeSource.js +3 -0
  64. package/lib/structures/ITtscNativeSource.js.map +1 -0
  65. package/lib/structures/ITtscParsedProjectConfig.d.ts +9 -0
  66. package/lib/structures/ITtscParsedProjectConfig.js +3 -0
  67. package/lib/structures/ITtscParsedProjectConfig.js.map +1 -0
  68. package/lib/structures/ITtscPlugin.d.ts +10 -0
  69. package/lib/structures/ITtscPlugin.js +3 -0
  70. package/lib/structures/ITtscPlugin.js.map +1 -0
  71. package/lib/structures/ITtscPluginFactory.d.ts +4 -0
  72. package/lib/structures/ITtscPluginFactory.js +3 -0
  73. package/lib/structures/ITtscPluginFactory.js.map +1 -0
  74. package/lib/structures/ITtscPluginFactoryContext.d.ts +8 -0
  75. package/lib/structures/ITtscPluginFactoryContext.js +3 -0
  76. package/lib/structures/ITtscPluginFactoryContext.js.map +1 -0
  77. package/lib/structures/ITtscPluginModule.d.ts +3 -0
  78. package/lib/structures/ITtscPluginModule.js +3 -0
  79. package/lib/structures/ITtscPluginModule.js.map +1 -0
  80. package/lib/structures/ITtscPreparedExecution.d.ts +5 -0
  81. package/lib/structures/ITtscPreparedExecution.js +3 -0
  82. package/lib/structures/ITtscPreparedExecution.js.map +1 -0
  83. package/lib/structures/ITtscProjectLocatorOptions.d.ts +5 -0
  84. package/lib/structures/ITtscProjectLocatorOptions.js +3 -0
  85. package/lib/structures/ITtscProjectLocatorOptions.js.map +1 -0
  86. package/lib/structures/ITtscProjectPluginConfig.d.ts +5 -0
  87. package/lib/structures/ITtscProjectPluginConfig.js +3 -0
  88. package/lib/structures/ITtscProjectPluginConfig.js.map +1 -0
  89. package/lib/structures/ITtscRegisterOptions.d.ts +6 -0
  90. package/lib/structures/ITtscRegisterOptions.js +3 -0
  91. package/lib/structures/ITtscRegisterOptions.js.map +1 -0
  92. package/lib/structures/ITtscResolveGoBinaryOptions.d.ts +7 -0
  93. package/lib/structures/ITtscResolveGoBinaryOptions.js +3 -0
  94. package/lib/structures/ITtscResolveGoBinaryOptions.js.map +1 -0
  95. package/lib/structures/ITtscResolveOptions.d.ts +20 -0
  96. package/lib/structures/ITtscResolveOptions.js +3 -0
  97. package/lib/structures/ITtscResolveOptions.js.map +1 -0
  98. package/lib/structures/ITtscResolvedTsgo.d.ts +8 -0
  99. package/lib/structures/ITtscResolvedTsgo.js +3 -0
  100. package/lib/structures/ITtscResolvedTsgo.js.map +1 -0
  101. package/lib/structures/ITtscTransformOptions.d.ts +12 -0
  102. package/lib/structures/ITtscTransformOptions.js +3 -0
  103. package/lib/structures/ITtscTransformOptions.js.map +1 -0
  104. package/lib/structures/ITtscTsgoResolveOptions.d.ts +14 -0
  105. package/lib/structures/ITtscTsgoResolveOptions.js +3 -0
  106. package/lib/structures/ITtscTsgoResolveOptions.js.map +1 -0
  107. package/lib/tsgo.d.ts +6 -24
  108. package/lib/tsgo.js.map +1 -1
  109. package/package.json +10 -10
  110. package/shim/ast/go.mod +1 -1
  111. package/shim/ast/lint.go +2 -0
  112. package/shim/bundled/go.mod +1 -1
  113. package/shim/checker/go.mod +1 -1
  114. package/shim/compiler/go.mod +1 -1
  115. package/shim/core/go.mod +1 -1
  116. package/shim/diagnosticwriter/go.mod +1 -1
  117. package/shim/parser/go.mod +1 -1
  118. package/shim/scanner/go.mod +1 -1
  119. package/shim/tsoptions/go.mod +1 -1
  120. package/shim/tspath/go.mod +1 -1
  121. package/shim/vfs/cachedvfs/go.mod +1 -1
  122. package/shim/vfs/go.mod +1 -1
  123. package/shim/vfs/osvfs/go.mod +1 -1
  124. package/src/api.ts +108 -155
  125. package/src/cli.ts +10 -10
  126. package/src/native.ts +9 -23
  127. package/src/platform.ts +10 -27
  128. package/src/plugin.ts +37 -74
  129. package/src/project.ts +18 -37
  130. package/src/runner/cli.ts +5 -5
  131. package/src/runner/register.ts +32 -43
  132. package/src/source-build.ts +45 -25
  133. package/src/structures/ITtscBuildOptions.ts +19 -0
  134. package/src/structures/ITtscBuildResult.ts +6 -0
  135. package/src/structures/ITtscBuildSourcePluginOptions.ts +9 -0
  136. package/src/structures/ITtscCacheKeyInput.ts +7 -0
  137. package/src/structures/ITtscCheckOptions.ts +3 -0
  138. package/src/structures/ITtscCommonOptions.ts +23 -0
  139. package/src/structures/ITtscLoadPluginsOptions.ts +9 -0
  140. package/src/structures/ITtscLoadedNativePlugin.ts +8 -0
  141. package/src/structures/ITtscLoadedPlugins.ts +12 -0
  142. package/src/structures/ITtscNativeBackend.ts +11 -0
  143. package/src/structures/ITtscNativePluginContractVersion.ts +1 -0
  144. package/src/structures/ITtscNativePluginShape.ts +9 -0
  145. package/src/structures/ITtscNativeRewriteMode.ts +1 -0
  146. package/src/structures/ITtscNativeSource.ts +4 -0
  147. package/src/structures/ITtscParsedProjectConfig.ts +10 -0
  148. package/src/structures/ITtscPlugin.ts +11 -0
  149. package/src/structures/ITtscPluginFactory.ts +7 -0
  150. package/src/structures/ITtscPluginFactoryContext.ts +9 -0
  151. package/src/structures/ITtscPluginModule.ts +4 -0
  152. package/src/structures/ITtscPreparedExecution.ts +5 -0
  153. package/src/structures/ITtscProjectLocatorOptions.ts +5 -0
  154. package/src/structures/ITtscProjectPluginConfig.ts +5 -0
  155. package/src/structures/ITtscRegisterOptions.ts +7 -0
  156. package/src/structures/ITtscResolveGoBinaryOptions.ts +7 -0
  157. package/src/structures/ITtscResolveOptions.ts +20 -0
  158. package/src/structures/ITtscResolvedTsgo.ts +8 -0
  159. package/src/structures/ITtscTransformOptions.ts +13 -0
  160. package/src/structures/ITtscTsgoResolveOptions.ts +14 -0
  161. package/src/tsgo.ts +6 -24
  162. package/test/source-build.test.ts +13 -0
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscPlugin.js","sourceRoot":"","sources":["../../src/structures/ITtscPlugin.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { ITtscPlugin } from "./ITtscPlugin";
2
+ import type { ITtscPluginFactoryContext } from "./ITtscPluginFactoryContext";
3
+ import type { ITtscProjectPluginConfig } from "./ITtscProjectPluginConfig";
4
+ export type ITtscPluginFactory<T = ITtscProjectPluginConfig> = (context: ITtscPluginFactoryContext<T>) => ITtscPlugin;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscPluginFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscPluginFactory.js","sourceRoot":"","sources":["../../src/structures/ITtscPluginFactory.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import type { ITtscProjectPluginConfig } from "./ITtscProjectPluginConfig";
2
+ export interface ITtscPluginFactoryContext<T = ITtscProjectPluginConfig> {
3
+ binary: string;
4
+ cwd: string;
5
+ plugin: T;
6
+ projectRoot: string;
7
+ tsconfig: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscPluginFactoryContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscPluginFactoryContext.js","sourceRoot":"","sources":["../../src/structures/ITtscPluginFactoryContext.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { ITtscPlugin } from "./ITtscPlugin";
2
+ import type { ITtscPluginFactory } from "./ITtscPluginFactory";
3
+ export type ITtscPluginModule = ITtscPlugin | ITtscPluginFactory;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscPluginModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscPluginModule.js","sourceRoot":"","sources":["../../src/structures/ITtscPluginModule.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface ITtscPreparedExecution {
2
+ emitDir: string;
3
+ entryFile: string;
4
+ moduleKind: "cjs" | "esm";
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscPreparedExecution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscPreparedExecution.js","sourceRoot":"","sources":["../../src/structures/ITtscPreparedExecution.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface ITtscProjectLocatorOptions {
2
+ cwd?: string;
3
+ file?: string;
4
+ tsconfig?: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscProjectLocatorOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscProjectLocatorOptions.js","sourceRoot":"","sources":["../../src/structures/ITtscProjectLocatorOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface ITtscProjectPluginConfig {
2
+ enabled?: boolean;
3
+ transform?: string;
4
+ [key: string]: unknown;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscProjectPluginConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscProjectPluginConfig.js","sourceRoot":"","sources":["../../src/structures/ITtscProjectPluginConfig.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { ITtscCommonOptions } from "./ITtscCommonOptions";
2
+ export interface ITtscRegisterOptions extends ITtscCommonOptions {
3
+ cacheDir?: string;
4
+ project?: string;
5
+ extensions?: readonly string[];
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscRegisterOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscRegisterOptions.js","sourceRoot":"","sources":["../../src/structures/ITtscRegisterOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export interface ITtscResolveGoBinaryOptions {
2
+ arch?: string;
3
+ env?: NodeJS.ProcessEnv;
4
+ localGoLookup?: () => string | null;
5
+ platform?: NodeJS.Platform;
6
+ resolver?: (request: string) => string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscResolveGoBinaryOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscResolveGoBinaryOptions.js","sourceRoot":"","sources":["../../src/structures/ITtscResolveGoBinaryOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ export interface ITtscResolveOptions {
2
+ /**
3
+ * Override `require.resolve` for testing. Takes a module request string and
4
+ * returns an absolute path (or throws).
5
+ */
6
+ resolver?: (request: string) => string;
7
+ /** Override `process.platform` for testing. */
8
+ platform?: NodeJS.Platform;
9
+ /** Override `process.arch` for testing. */
10
+ arch?: string;
11
+ /** Override `process.env` for testing. */
12
+ env?: NodeJS.ProcessEnv;
13
+ /**
14
+ * Override the package-local scan used for the local `native/ttsc-native`
15
+ * fallback. Returns an absolute path if present, else null.
16
+ */
17
+ localBinaryLookup?: () => string | null;
18
+ /** Override the module directory used to resolve the package-local binary. */
19
+ moduleDir?: string;
20
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscResolveOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscResolveOptions.js","sourceRoot":"","sources":["../../src/structures/ITtscResolveOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export interface ITtscResolvedTsgo {
2
+ binary: string;
3
+ gitHead?: string;
4
+ packageJson: string;
5
+ packageRoot: string;
6
+ platformPackageJson?: string;
7
+ version: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscResolvedTsgo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscResolvedTsgo.js","sourceRoot":"","sources":["../../src/structures/ITtscResolvedTsgo.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import type { ITtscCommonOptions } from "./ITtscCommonOptions";
2
+ export interface ITtscTransformOptions extends ITtscCommonOptions {
3
+ /** Path to the .ts file to transform. Absolute or `cwd`-relative. */
4
+ file: string;
5
+ /** Path to the tsconfig owning `file`. Default: `tsconfig.json`. */
6
+ tsconfig?: string;
7
+ /**
8
+ * When provided, the binary writes JS directly to this path instead of piping
9
+ * stdout. Useful when the emitted text is large.
10
+ */
11
+ out?: string;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscTransformOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscTransformOptions.js","sourceRoot":"","sources":["../../src/structures/ITtscTransformOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ export interface ITtscTsgoResolveOptions {
2
+ /** Absolute path to an explicit tsgo-compatible binary. */
3
+ binary?: string;
4
+ /** Project directory used for node_modules resolution. */
5
+ cwd?: string;
6
+ /** Environment variables used for explicit binary overrides. */
7
+ env?: NodeJS.ProcessEnv;
8
+ /** Override process.platform for tests. */
9
+ platform?: NodeJS.Platform;
10
+ /** Override process.arch for tests. */
11
+ arch?: string;
12
+ /** Override package resolution for tests. */
13
+ resolver?: (request: string) => string;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscTsgoResolveOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscTsgoResolveOptions.js","sourceRoot":"","sources":["../../src/structures/ITtscTsgoResolveOptions.ts"],"names":[],"mappings":""}
package/lib/tsgo.d.ts CHANGED
@@ -1,24 +1,6 @@
1
- export interface TsgoResolveOptions {
2
- /** Absolute path to an explicit tsgo-compatible binary. */
3
- binary?: string;
4
- /** Project directory used for node_modules resolution. */
5
- cwd?: string;
6
- /** Environment variables used for explicit binary overrides. */
7
- env?: NodeJS.ProcessEnv;
8
- /** Override process.platform for tests. */
9
- platform?: NodeJS.Platform;
10
- /** Override process.arch for tests. */
11
- arch?: string;
12
- /** Override package resolution for tests. */
13
- resolver?: (request: string) => string;
14
- }
15
- export interface ResolvedTsgo {
16
- binary: string;
17
- gitHead?: string;
18
- packageJson: string;
19
- packageRoot: string;
20
- platformPackageJson?: string;
21
- version: string;
22
- }
23
- export declare function nativePreviewPlatformPackage(opts?: TsgoResolveOptions): string;
24
- export declare function resolveTsgo(opts?: TsgoResolveOptions): ResolvedTsgo;
1
+ import type { ITtscResolvedTsgo } from "./structures/ITtscResolvedTsgo";
2
+ import type { ITtscTsgoResolveOptions } from "./structures/ITtscTsgoResolveOptions";
3
+ export type { ITtscResolvedTsgo } from "./structures/ITtscResolvedTsgo";
4
+ export type { ITtscTsgoResolveOptions } from "./structures/ITtscTsgoResolveOptions";
5
+ export declare function nativePreviewPlatformPackage(opts?: ITtscTsgoResolveOptions): string;
6
+ export declare function resolveTsgo(opts?: ITtscTsgoResolveOptions): ITtscResolvedTsgo;
package/lib/tsgo.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tsgo.js","sourceRoot":"","sources":["../src/tsgo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,EAAE,oCAAgB;AAC9B,6CAA4C;AAC5C,MAAY,IAAI,sCAAkB;AA0BlC,sCACE,IAAI,GAAuB,EAAE;IAE7B,OAAO,8BAA8B,IAAI,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,IACpE,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,IACvB,EAAE,CAAC;AACL,CAAC;AAED,qBAA4B,IAAI,GAAuB,EAAE;IACvD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,CAAC,gBAAgB,CAAC;IACrD,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CA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,CAAC,SAAS;KAC7E,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAA4B,CAAC;AAC9E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ttsc",
3
- "version": "0.5.0",
3
+ "version": "0.6.0-dev.20250430",
4
4
  "description": "General-purpose TypeScript-Go compiler, plugin host, and runtime.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -27,17 +27,17 @@
27
27
  "homepage": "https://github.com/samchon/ttsc",
28
28
  "devDependencies": {
29
29
  "@types/node": "^25.3.0",
30
- "@typescript/native-preview": "7.0.0-dev.20260428.1",
30
+ "@typescript/native-preview": "7.0.0-dev.20260429.1",
31
31
  "rimraf": "^6.1.2"
32
32
  },
33
33
  "optionalDependencies": {
34
- "@ttsc/linux-x64": "0.5.0",
35
- "@ttsc/linux-arm64": "0.5.0",
36
- "@ttsc/darwin-x64": "0.5.0",
37
- "@ttsc/darwin-arm64": "0.5.0",
38
- "@ttsc/win32-x64": "0.5.0",
39
- "@ttsc/win32-arm64": "0.5.0",
40
- "@ttsc/linux-arm": "0.5.0"
34
+ "@ttsc/linux-x64": "0.6.0-dev.20250430",
35
+ "@ttsc/linux-arm": "0.6.0-dev.20250430",
36
+ "@ttsc/darwin-x64": "0.6.0-dev.20250430",
37
+ "@ttsc/linux-arm64": "0.6.0-dev.20250430",
38
+ "@ttsc/win32-x64": "0.6.0-dev.20250430",
39
+ "@ttsc/darwin-arm64": "0.6.0-dev.20250430",
40
+ "@ttsc/win32-arm64": "0.6.0-dev.20250430"
41
41
  },
42
42
  "sideEffects": false,
43
43
  "files": [
@@ -61,7 +61,7 @@
61
61
  "ttsc"
62
62
  ],
63
63
  "scripts": {
64
- "build": "rimraf lib && tsgo -p tsconfig.json && cp ../../README.md README.md",
64
+ "build": "rimraf lib && tsgo && cp ../../README.md README.md",
65
65
  "test": "pnpm run test:ts && pnpm run test:go",
66
66
  "test:ts": "node --test --test-reporter=spec --experimental-strip-types --experimental-specifier-resolution=node test/**/*.test.ts",
67
67
  "test:go": "node ../../scripts/go.cjs test ./...",
package/shim/ast/go.mod CHANGED
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/ast
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
package/shim/ast/lint.go CHANGED
@@ -55,6 +55,7 @@ type WithStatement = innerast.WithStatement
55
55
 
56
56
  type ClassDeclaration = innerast.ClassDeclaration
57
57
  type ClassExpression = innerast.ClassExpression
58
+ type ClassStaticBlockDeclaration = innerast.ClassStaticBlockDeclaration
58
59
  type ConstructorDeclaration = innerast.ConstructorDeclaration
59
60
  type EnumDeclaration = innerast.EnumDeclaration
60
61
  type EnumMember = innerast.EnumMember
@@ -106,6 +107,7 @@ type TaggedTemplateExpression = innerast.TaggedTemplateExpression
106
107
  type TemplateExpression = innerast.TemplateExpression
107
108
  type TemplateSpan = innerast.TemplateSpan
108
109
  type TypeAssertion = innerast.TypeAssertion
110
+ type TypeOperatorNode = innerast.TypeOperatorNode
109
111
  type TypeOfExpression = innerast.TypeOfExpression
110
112
  type VoidExpression = innerast.VoidExpression
111
113
  type YieldExpression = innerast.YieldExpression
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/bundled
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/checker
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/compiler
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
package/shim/core/go.mod CHANGED
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/core
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/diagnosticwriter
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/parser
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/scanner
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/tsoptions
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/tspath
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/vfs/cachedvfs
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
package/shim/vfs/go.mod CHANGED
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/vfs
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
@@ -2,4 +2,4 @@ module github.com/microsoft/typescript-go/shim/vfs/osvfs
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260428010401-3499951dbc49
5
+ require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157