@ttsc/playground 0.15.0 → 0.15.2

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.
@@ -3,16 +3,17 @@
3
3
  * pass these straight to `buildTsconfigJSON`; consumer code that needs a tweak
4
4
  * spreads the constant and overrides individual fields.
5
5
  *
6
- * `target` and `module` are TypeScript's numeric enum values (99 = ESNext, 199
7
- * = NodeNext, …). They are spelled numerically here because the wasm doesn't
8
- * run the TS configuration parser through a string→enum step before Go reads
9
- * the JSON; passing the canonical numbers avoids version-drift.
6
+ * Enum-typed options (`target`, `moduleResolution`, `module`) are spelled with
7
+ * their string names. The wasm runs the real tsgo configuration parser, which
8
+ * validates enum options against their name map and rejects raw numbers with
9
+ * `TS5024: Compiler option '…' requires a value of type enum.` — so a numeric
10
+ * `target: 99` aborts the whole compile and leaves the JS pane blank.
10
11
  */
11
12
  export declare const DEFAULT_PLAYGROUND_COMPILER_OPTIONS: {
12
- readonly target: 99;
13
+ readonly target: "ESNext";
13
14
  readonly esModuleInterop: true;
14
15
  readonly forceConsistentCasingInFileNames: true;
15
- readonly moduleResolution: 100;
16
+ readonly moduleResolution: "Bundler";
16
17
  readonly strict: true;
17
18
  readonly skipLibCheck: true;
18
19
  readonly experimentalDecorators: true;
@@ -6,16 +6,17 @@ exports.DEFAULT_PLAYGROUND_COMPILER_OPTIONS = void 0;
6
6
  * pass these straight to `buildTsconfigJSON`; consumer code that needs a tweak
7
7
  * spreads the constant and overrides individual fields.
8
8
  *
9
- * `target` and `module` are TypeScript's numeric enum values (99 = ESNext, 199
10
- * = NodeNext, …). They are spelled numerically here because the wasm doesn't
11
- * run the TS configuration parser through a string→enum step before Go reads
12
- * the JSON; passing the canonical numbers avoids version-drift.
9
+ * Enum-typed options (`target`, `moduleResolution`, `module`) are spelled with
10
+ * their string names. The wasm runs the real tsgo configuration parser, which
11
+ * validates enum options against their name map and rejects raw numbers with
12
+ * `TS5024: Compiler option '…' requires a value of type enum.` — so a numeric
13
+ * `target: 99` aborts the whole compile and leaves the JS pane blank.
13
14
  */
14
15
  exports.DEFAULT_PLAYGROUND_COMPILER_OPTIONS = {
15
- target: 99,
16
+ target: "ESNext",
16
17
  esModuleInterop: true,
17
18
  forceConsistentCasingInFileNames: true,
18
- moduleResolution: 100,
19
+ moduleResolution: "Bundler",
19
20
  strict: true,
20
21
  skipLibCheck: true,
21
22
  experimentalDecorators: true,
@@ -1 +1 @@
1
- {"version":3,"file":"DEFAULT_PLAYGROUND_COMPILER_OPTIONS.js","sourceRoot":"","sources":["../../../src/compiler/DEFAULT_PLAYGROUND_COMPILER_OPTIONS.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACU,QAAA,mCAAmC,GAAG;IACjD,MAAM,EAAE,EAAE;IACV,eAAe,EAAE,IAAI;IACrB,gCAAgC,EAAE,IAAI;IACtC,gBAAgB,EAAE,GAAG;IACrB,MAAM,EAAE,IAAI;IACZ,YAAY,EAAE,IAAI;IAClB,sBAAsB,EAAE,IAAI;CACpB,CAAC"}
1
+ {"version":3,"file":"DEFAULT_PLAYGROUND_COMPILER_OPTIONS.js","sourceRoot":"","sources":["../../../src/compiler/DEFAULT_PLAYGROUND_COMPILER_OPTIONS.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACU,QAAA,mCAAmC,GAAG;IACjD,MAAM,EAAE,QAAQ;IAChB,eAAe,EAAE,IAAI;IACrB,gCAAgC,EAAE,IAAI;IACtC,gBAAgB,EAAE,SAAS;IAC3B,MAAM,EAAE,IAAI;IACZ,YAAY,EAAE,IAAI;IAClB,sBAAsB,EAAE,IAAI;CACpB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttsc/playground",
3
- "version": "0.15.0",
3
+ "version": "0.15.2",
4
4
  "description": "Reusable React + Web Worker scaffolding for in-browser ttsc playgrounds built on @ttsc/wasm.",
5
5
  "main": "lib/src/index.js",
6
6
  "types": "lib/src/index.d.ts",
@@ -38,7 +38,7 @@
38
38
  "react": "^18.0.0",
39
39
  "react-dom": "^18.0.0",
40
40
  "tgrid": "^1.0.3",
41
- "@ttsc/wasm": "^0.15.0"
41
+ "@ttsc/wasm": "^0.15.2"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@monaco-editor/react": "^4.6.0",
@@ -50,7 +50,7 @@
50
50
  "react-dom": "^18.3.1",
51
51
  "rimraf": "^6.1.2",
52
52
  "tgrid": "^1.0.3",
53
- "@ttsc/wasm": "^0.15.0"
53
+ "@ttsc/wasm": "^0.15.2"
54
54
  },
55
55
  "keywords": [
56
56
  "ttsc",
@@ -3,16 +3,17 @@
3
3
  * pass these straight to `buildTsconfigJSON`; consumer code that needs a tweak
4
4
  * spreads the constant and overrides individual fields.
5
5
  *
6
- * `target` and `module` are TypeScript's numeric enum values (99 = ESNext, 199
7
- * = NodeNext, …). They are spelled numerically here because the wasm doesn't
8
- * run the TS configuration parser through a string→enum step before Go reads
9
- * the JSON; passing the canonical numbers avoids version-drift.
6
+ * Enum-typed options (`target`, `moduleResolution`, `module`) are spelled with
7
+ * their string names. The wasm runs the real tsgo configuration parser, which
8
+ * validates enum options against their name map and rejects raw numbers with
9
+ * `TS5024: Compiler option '…' requires a value of type enum.` — so a numeric
10
+ * `target: 99` aborts the whole compile and leaves the JS pane blank.
10
11
  */
11
12
  export const DEFAULT_PLAYGROUND_COMPILER_OPTIONS = {
12
- target: 99,
13
+ target: "ESNext",
13
14
  esModuleInterop: true,
14
15
  forceConsistentCasingInFileNames: true,
15
- moduleResolution: 100,
16
+ moduleResolution: "Bundler",
16
17
  strict: true,
17
18
  skipLibCheck: true,
18
19
  experimentalDecorators: true,