@ttsc/wasm 0.14.0-dev.20260529.1 → 0.14.0
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/README.md +6 -6
- package/dist/ttsc.wasm +0 -0
- package/host/fountain.go +290 -290
- package/lib/src/MemFSError.d.ts +3 -3
- package/lib/src/MemFSError.js +3 -3
- package/lib/src/bootTtsc.d.ts +12 -12
- package/lib/src/bootTtsc.js +33 -34
- package/lib/src/bootTtsc.js.map +1 -1
- package/lib/src/createMemFS.js +2 -2
- package/lib/src/createMemFS.js.map +1 -1
- package/lib/src/parseResult.d.ts +2 -3
- package/lib/src/parseResult.js +2 -3
- package/lib/src/parseResult.js.map +1 -1
- package/lib/src/structures/IBootTtscOptions.d.ts +6 -7
- package/lib/src/structures/ITtscApi.d.ts +5 -5
- package/lib/src/structures/ITtscCompileResult.d.ts +2 -2
- package/lib/src/structures/ITtscPositionQuery.d.ts +4 -1
- package/lib/src/structures/ITtscTransformResult.d.ts +2 -2
- package/lib/src/structures/IWasmExecFS.d.ts +3 -3
- package/package.json +2 -2
- package/src/MemFSError.ts +3 -3
- package/src/bootTtsc.ts +31 -33
- package/src/createMemFS.ts +0 -1
- package/src/parseResult.ts +2 -3
- package/src/structures/IBootTtscOptions.ts +6 -7
- package/src/structures/ITtscApi.ts +5 -5
- package/src/structures/ITtscCompileResult.ts +2 -2
- package/src/structures/ITtscPositionQuery.ts +4 -1
- package/src/structures/ITtscTransformResult.ts +2 -2
- package/src/structures/IWasmExecFS.ts +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ITtscBuildOpts } from "./ITtscBuildOpts";
|
|
2
|
+
import type { ITtscFileQuery } from "./ITtscFileQuery";
|
|
2
3
|
import type { ITtscPluginOpts } from "./ITtscPluginOpts";
|
|
3
4
|
import type { ITtscPositionQuery } from "./ITtscPositionQuery";
|
|
4
|
-
import type { ITtscFileQuery } from "./ITtscFileQuery";
|
|
5
5
|
import type { ITtscResult } from "./ITtscResult";
|
|
6
6
|
import type { ITtscSnapshotHandle } from "./ITtscSnapshotHandle";
|
|
7
7
|
import type { ITtscVersion } from "./ITtscVersion";
|
|
@@ -38,8 +38,8 @@ export interface ITtscApi {
|
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Dispatch a registered plugin's subcommand. Returns the captured stdout /
|
|
41
|
-
* stderr (the same streams the native sidecar binary would write to)
|
|
42
|
-
*
|
|
41
|
+
* stderr (the same streams the native sidecar binary would write to) together
|
|
42
|
+
* with the exit code.
|
|
43
43
|
*/
|
|
44
44
|
plugin(opts: ITtscPluginOpts): Promise<ITtscResult>;
|
|
45
45
|
|
|
@@ -76,8 +76,8 @@ export interface ITtscApi {
|
|
|
76
76
|
getSourceFileText(opts: ITtscFileQuery): Promise<ITtscResult>;
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
* Diagnostics from the snapshot's program. Pass `file` to filter to a
|
|
80
|
-
*
|
|
79
|
+
* Diagnostics from the snapshot's program. Pass `file` to filter to a single
|
|
80
|
+
* project-relative path.
|
|
81
81
|
*/
|
|
82
82
|
getDiagnostics(
|
|
83
83
|
opts: ITtscSnapshotHandle & { file?: string },
|
|
@@ -3,8 +3,8 @@ import type { ITtscDiagnostic } from "./ITtscDiagnostic";
|
|
|
3
3
|
/**
|
|
4
4
|
* Structured payload inside `ITtscResult.result` for `build` and `check`.
|
|
5
5
|
*
|
|
6
|
-
* `output` maps emit-destination paths (relative to `cwd`) to file contents.
|
|
7
|
-
*
|
|
6
|
+
* `output` maps emit-destination paths (relative to `cwd`) to file contents. It
|
|
7
|
+
* is empty when `check` is called without emit.
|
|
8
8
|
*/
|
|
9
9
|
export interface ITtscCompileResult {
|
|
10
10
|
diagnostics?: ITtscDiagnostic[];
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { ITtscFileQuery } from "./ITtscFileQuery";
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Request shape for `getNodeAtPosition`, `getTypeAtPosition`,
|
|
5
|
+
* `getSymbolAtPosition`.
|
|
6
|
+
*/
|
|
4
7
|
export interface ITtscPositionQuery extends ITtscFileQuery {
|
|
5
8
|
/**
|
|
6
9
|
* Byte offset into the file's source text. JS callers with a UTF-16
|
|
@@ -4,8 +4,8 @@ import type { ITtscDiagnostic } from "./ITtscDiagnostic";
|
|
|
4
4
|
* Structured payload inside `ITtscResult.result` for `transform`.
|
|
5
5
|
*
|
|
6
6
|
* `typescript` maps source file paths (relative to `cwd`) to their
|
|
7
|
-
* post-transform TypeScript text — useful for playgrounds that want to show
|
|
8
|
-
*
|
|
7
|
+
* post-transform TypeScript text — useful for playgrounds that want to show the
|
|
8
|
+
* rewritten source before it is emitted.
|
|
9
9
|
*/
|
|
10
10
|
export interface ITtscTransformResult {
|
|
11
11
|
diagnostics?: ITtscDiagnostic[];
|
|
@@ -136,9 +136,9 @@ export interface IWasmExecFS {
|
|
|
136
136
|
): void;
|
|
137
137
|
/**
|
|
138
138
|
* `pipe2` is what Go's wasm `os.Pipe()` calls. Returns two fds: a read end
|
|
139
|
-
* and a write end. The host's stdout/stderr capture currently uses MemFS
|
|
140
|
-
*
|
|
141
|
-
*
|
|
139
|
+
* and a write end. The host's stdout/stderr capture currently uses MemFS temp
|
|
140
|
+
* files, but this keeps direct pipe callers compatible with the wasm fs
|
|
141
|
+
* surface.
|
|
142
142
|
*/
|
|
143
143
|
pipe2(
|
|
144
144
|
flags: number,
|