@fossil-lang/wasm 0.3.0-alpha.2 → 0.3.0-alpha.21
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 +98 -32
- package/dist/client.d.ts +206 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +250 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +144 -215
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -195
- package/dist/index.js.map +1 -1
- package/dist/load.d.ts +14 -20
- package/dist/load.d.ts.map +1 -1
- package/dist/load.js +23 -15
- package/dist/load.js.map +1 -1
- package/dist/program.d.ts +68 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +117 -0
- package/dist/program.js.map +1 -0
- package/package.json +6 -5
- package/pkg/fossil_wasm.d.ts +231 -133
- package/pkg/fossil_wasm.js +348 -282
- package/pkg/fossil_wasm_bg.wasm +0 -0
- package/pkg/fossil_wasm_bg.wasm.d.ts +19 -14
package/pkg/fossil_wasm.d.ts
CHANGED
|
@@ -7,6 +7,24 @@
|
|
|
7
7
|
*
|
|
8
8
|
* `Copy + Clone + Eq + Hash` so it can be a `HashMap` key on the Rust
|
|
9
9
|
* side; `#[wasm_bindgen]` so JS can pass it back across the boundary.
|
|
10
|
+
*
|
|
11
|
+
* # Every exported method takes `&FileHandle`, and it has to
|
|
12
|
+
*
|
|
13
|
+
* wasm-bindgen CONSUMES an exported struct passed by value: the generated glue
|
|
14
|
+
* calls `__destroy_into_raw()` on the JS wrapper, which nulls its pointer. A
|
|
15
|
+
* handle passed by value is therefore good for exactly one call, and the second
|
|
16
|
+
* throws *"null pointer passed to rust"* — from inside a method that has nothing
|
|
17
|
+
* wrong with it, naming no handle and no file.
|
|
18
|
+
*
|
|
19
|
+
* `Copy` does not save it. The derive is a Rust-side property; nothing about it
|
|
20
|
+
* reaches the JS boundary, where this is a class holding a pointer like any
|
|
21
|
+
* other. The three methods a host calls repeatedly with one handle
|
|
22
|
+
* (`update_file`, `close_file`, `diagnostics_for`) take `&FileHandle` so
|
|
23
|
+
* wasm-bindgen borrows instead, and the handle stays live across the whole
|
|
24
|
+
* lifetime `open_file`'s doc comment promises.
|
|
25
|
+
*
|
|
26
|
+
* This was reachable from the FIRST loop an editor runs: `updateFile(h, text)` on
|
|
27
|
+
* every check, with the handle `openFile` returned once.
|
|
10
28
|
*/
|
|
11
29
|
export class FileHandle {
|
|
12
30
|
private constructor();
|
|
@@ -15,163 +33,223 @@ export class FileHandle {
|
|
|
15
33
|
}
|
|
16
34
|
|
|
17
35
|
/**
|
|
18
|
-
* JS-facing
|
|
36
|
+
* The JS-facing workspace — `FossilWorkspace` on the JS side, and a
|
|
37
|
+
* `RefCell` around the Rust one.
|
|
38
|
+
*
|
|
39
|
+
* # Why the interior `RefCell`, and it is not a style choice
|
|
40
|
+
*
|
|
41
|
+
* `wasm-bindgen` wraps every exported struct in its own `WasmRefCell`. A
|
|
42
|
+
* method taking `&mut self` borrows that cell EXCLUSIVELY for the call, and a
|
|
43
|
+
* failed borrow does not return — it panics, with
|
|
44
|
+
* *"recursive use of an object detected which would lead to unsafe aliasing in
|
|
45
|
+
* rust"*. On `wasm32-unknown-unknown` a panic is an abort: the trap unwinds
|
|
46
|
+
* nothing, so the borrow flag it was holding is never cleared, and **every
|
|
47
|
+
* later call on that object fails the same way for the life of the module.**
|
|
48
|
+
* One bad call poisons the workspace permanently.
|
|
49
|
+
*
|
|
50
|
+
* That is a real defect and it was reachable from correct host code: an
|
|
51
|
+
* editor reproduced it by typing sixteen characters faster than its
|
|
52
|
+
* debounce, and had to carry a `busy` flag and a 120 ms coalesce to stay
|
|
53
|
+
* out of it. A mitigation a host has to remember is not a fix — and an editor
|
|
54
|
+
* is precisely the workload that forgets.
|
|
55
|
+
*
|
|
56
|
+
* So no exported method takes `&mut self`. Every one takes `&self`, which
|
|
57
|
+
* wasm-bindgen borrows SHARED — shared borrows nest, so re-entry cannot fail
|
|
58
|
+
* there — and the mutation goes through this `RefCell` with
|
|
59
|
+
* `try_borrow_mut`. Genuine re-entry (a JS callback that calls back in while a
|
|
60
|
+
* call is live) now returns a catchable `Error` naming what happened, and
|
|
61
|
+
* **the workspace is still usable afterwards**, because a returned `Err` drops
|
|
62
|
+
* its guard where a panic did not.
|
|
19
63
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* browser tab / Node process and reuse it across all method calls to
|
|
23
|
-
* amortise the Salsa interning + memoisation overhead.
|
|
64
|
+
* The Rust-side [`FossilWorkspace`] keeps its `&mut self` signatures
|
|
65
|
+
* untouched: the native tests drive it directly. Only the JS boundary changed.
|
|
24
66
|
*/
|
|
25
|
-
export class
|
|
67
|
+
export class FossilWorkspace {
|
|
26
68
|
free(): void;
|
|
27
69
|
[Symbol.dispose](): void;
|
|
28
70
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
71
|
+
* Every open **program**'s diagnostics as a flat JS array of
|
|
72
|
+
* [`CheckRow`]s keyed by file URI — the diagnostics panel's view. It is
|
|
73
|
+
* NOT the LSP wire's shape; see [`CheckRow`].
|
|
74
|
+
*
|
|
75
|
+
* A buffer the installed provider catalogue claims — a `.shex` being
|
|
76
|
+
* edited, a `.csv`, a `.parquet` — is an INPUT and is not parsed as fossil.
|
|
77
|
+
* [`fossil_ide::diagnostics()`] is where that is said and measured, for both
|
|
78
|
+
* hosts.
|
|
33
79
|
*
|
|
34
80
|
* `range` is the UTF-16 LSP range (via `fossil_ide::LineIndex` — the
|
|
35
|
-
* rust-analyzer model
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* `to_lsp_diagnostic` in 06-09).
|
|
81
|
+
* rust-analyzer model). `severity` is the LSP integer constant
|
|
82
|
+
* (1 = error, 2 = warning, 3 = info). `message` is the problem rendered
|
|
83
|
+
* and nothing else; `help` is its own field.
|
|
39
84
|
*
|
|
40
85
|
* # Errors
|
|
41
86
|
*
|
|
42
|
-
* Returns a JS error
|
|
87
|
+
* Returns a JS error if the workspace is busy, or if the result fails to
|
|
88
|
+
* serialize to `JsValue`.
|
|
43
89
|
*/
|
|
44
90
|
check(): any;
|
|
45
91
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
92
|
+
* Close a file in the workspace. Idempotent in spirit but strict in
|
|
93
|
+
* signal: closing an unknown / already-closed handle is an error so
|
|
94
|
+
* JS-side bugs surface loudly (mirrors `ty_wasm`).
|
|
95
|
+
*
|
|
96
|
+
* # Errors
|
|
97
|
+
*
|
|
98
|
+
* Returns a JS error if `handle` was never opened or was already closed,
|
|
99
|
+
* or if the workspace is busy.
|
|
100
|
+
*/
|
|
101
|
+
close_file(handle: FileHandle): void;
|
|
102
|
+
/**
|
|
103
|
+
* The completion candidates at a position: `{ label, kind, detail, insert }` rows,
|
|
104
|
+
* already narrowed by the receiver — `str.` offers string members and no
|
|
105
|
+
* reader, a property key position offers the target shape's predicates and
|
|
106
|
+
* no catalogue row.
|
|
107
|
+
*
|
|
108
|
+
* `kind` is the LSP `CompletionItemKind` **by name** (`"function"`,
|
|
109
|
+
* `"field"`). See [`ide::CompletionRow`] for why a number does not cross
|
|
110
|
+
* this boundary.
|
|
48
111
|
*
|
|
49
|
-
*
|
|
50
|
-
* playground reads this once at startup to render `native_udf_only`
|
|
51
|
-
* functions as disabled with a "native-only — unavailable in the browser"
|
|
52
|
-
* tooltip (SC#1 playground half). `DuckDB`-WASM cannot register the Rust
|
|
53
|
-
* UDFs those functions need (Pitfall 3), so the classification is the
|
|
54
|
-
* authority on what is runnable in-browser.
|
|
112
|
+
* # Errors
|
|
55
113
|
*
|
|
56
|
-
*
|
|
57
|
-
* `
|
|
58
|
-
|
|
114
|
+
* Returns a JS error if the workspace is busy, or if the result fails to
|
|
115
|
+
* serialize to `JsValue`. An unknown handle is an empty array.
|
|
116
|
+
*/
|
|
117
|
+
completions(handle: FileHandle, line: number, character: number): any;
|
|
118
|
+
/**
|
|
119
|
+
* Per-file diagnostic drain: `check()` returns the workspace-wide flat
|
|
120
|
+
* array, this returns one file's rows, so a host can refresh one buffer's
|
|
121
|
+
* panel without partitioning the workspace array on the JS side. It is NOT
|
|
122
|
+
* the LSP wire's shape — that is [`fossil_ide::lsp_diagnostics`].
|
|
59
123
|
*
|
|
60
124
|
* # Errors
|
|
61
125
|
*
|
|
62
|
-
* Returns a JS error
|
|
126
|
+
* Returns a JS error if `handle` is unknown, if the workspace is busy, or
|
|
127
|
+
* if serialization fails.
|
|
63
128
|
*/
|
|
64
|
-
|
|
129
|
+
diagnostics_for(handle: FileHandle): any;
|
|
65
130
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
131
|
+
* Where the name under the cursor is defined: `{ uri, range }` rows, empty
|
|
132
|
+
* when nothing there has a definition.
|
|
133
|
+
*
|
|
134
|
+
* `uri` is the key the host opened the buffer under, verbatim — and two of
|
|
135
|
+
* the three positions goto-def recognises resolve into the shape document,
|
|
136
|
+
* so a host with one pane has to read it before moving a cursor.
|
|
69
137
|
*
|
|
70
138
|
* # Errors
|
|
71
139
|
*
|
|
72
|
-
* Returns a JS error if
|
|
140
|
+
* Returns a JS error if the workspace is busy, or if the result fails to
|
|
141
|
+
* serialize to `JsValue`.
|
|
73
142
|
*/
|
|
74
|
-
|
|
143
|
+
gotoDefinition(handle: FileHandle, line: number, character: number): any;
|
|
75
144
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
145
|
+
* What is under the cursor: `{ markdown, range }`, or `null` when the
|
|
146
|
+
* cursor is on whitespace, on an expression the checker inferred no type
|
|
147
|
+
* for, or outside any mapping.
|
|
148
|
+
*
|
|
149
|
+
* `line` / `character` are LSP — zero-based, and `character` in UTF-16
|
|
150
|
+
* code units, which is what a JS host counts in anyway. The `range` comes
|
|
151
|
+
* back in the same units.
|
|
82
152
|
*
|
|
83
153
|
* # Errors
|
|
84
154
|
*
|
|
85
|
-
* Returns a JS error if
|
|
155
|
+
* Returns a JS error if the workspace is busy, or if the result fails to
|
|
156
|
+
* serialize to `JsValue`. An unknown handle is `null`, not an error —
|
|
157
|
+
* see [`FossilWorkspace::hover_row`].
|
|
86
158
|
*/
|
|
87
|
-
|
|
159
|
+
hover(handle: FileHandle, line: number, character: number): any;
|
|
88
160
|
/**
|
|
89
|
-
*
|
|
161
|
+
* The documents the file at `handle` names that nothing has registered:
|
|
162
|
+
* `{ key, locator }` rows, the locator expanded through the connection map.
|
|
90
163
|
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
164
|
+
* # Errors
|
|
165
|
+
*
|
|
166
|
+
* Returns a JS error if `handle` is unknown, if the workspace is busy, or
|
|
167
|
+
* if serialization fails.
|
|
168
|
+
*/
|
|
169
|
+
missingDocuments(handle: FileHandle): any;
|
|
170
|
+
/**
|
|
171
|
+
* Construct a new workspace.
|
|
172
|
+
*
|
|
173
|
+
* Installs `console_error_panic_hook` (idempotent) so any panic inside
|
|
174
|
+
* compiler-core surfaces as a `console.error` stack trace in the host
|
|
175
|
+
* (browser `DevTools` or Node).
|
|
94
176
|
*/
|
|
95
177
|
constructor();
|
|
96
178
|
/**
|
|
97
179
|
* Open a file in the workspace. Returns a [`FileHandle`] the JS side
|
|
98
|
-
* keys subsequent `update_file` / `close_file`
|
|
99
|
-
*
|
|
100
|
-
* the LSP client.
|
|
180
|
+
* keys subsequent `update_file` / `close_file` calls on. `path` is the
|
|
181
|
+
* URI / virtual path the diagnostics carry back to the LSP client.
|
|
101
182
|
*
|
|
102
183
|
* Mirrors `ty_wasm::Workspace::open_file` (Astral). Interns a fresh
|
|
103
184
|
* [`fossil_base::SourceFile`] under the current Salsa revision.
|
|
104
185
|
*
|
|
105
186
|
* # Errors
|
|
106
187
|
*
|
|
107
|
-
* Returns a JS error
|
|
108
|
-
*
|
|
109
|
-
* failure mode).
|
|
188
|
+
* Returns a JS error if the workspace is already inside another call —
|
|
189
|
+
* see the type-level note on [`WasmWorkspace`].
|
|
110
190
|
*/
|
|
111
191
|
open_file(path: string, contents: string): FileHandle;
|
|
192
|
+
/**
|
|
193
|
+
* Register a fetched document's `text` under the `key` `missingDocuments`
|
|
194
|
+
* reported.
|
|
195
|
+
*
|
|
196
|
+
* # Errors
|
|
197
|
+
*
|
|
198
|
+
* Returns a JS error if the workspace is busy.
|
|
199
|
+
*/
|
|
200
|
+
registerDocument(key: string, text: string): void;
|
|
112
201
|
/**
|
|
113
202
|
* Register an [`fossil_descriptors_input::InferredDescriptor`] for a
|
|
114
|
-
* source binding name BEFORE invoking
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
* the
|
|
121
|
-
* `InferredDescriptorJson`:
|
|
122
|
-
*
|
|
123
|
-
* ```json
|
|
124
|
-
* {
|
|
125
|
-
* "source_name": "users",
|
|
126
|
-
* "columns": [
|
|
127
|
-
* { "name": "id", "primitive": "Integer" },
|
|
128
|
-
* { "name": "name", "primitive": "String" }
|
|
129
|
-
* ],
|
|
130
|
-
* "content_hash": ""
|
|
131
|
-
* }
|
|
132
|
-
* ```
|
|
133
|
-
*
|
|
134
|
-
* Called by the browser-side playground orchestration AFTER running
|
|
135
|
-
* DuckDB-WASM `DESCRIBE read_csv_auto('<resolved-url>')` and BEFORE
|
|
136
|
-
* invoking `compile()` / `compile_file()`. Keyed by source-binding
|
|
137
|
-
* name (`"users"` for `users := io.csv("...")`), NOT by URL.
|
|
138
|
-
*
|
|
139
|
-
* Idempotent: re-registering with the same `source_name` OVERWRITES the
|
|
140
|
-
* previous entry — intentional, since the host may re-introspect when
|
|
141
|
-
* file content changes.
|
|
203
|
+
* source binding name BEFORE invoking `check`. The Rust compiler reads
|
|
204
|
+
* from this registration during forward type propagation — the browser has
|
|
205
|
+
* no filesystem to introspect a CSV from, so the column types must arrive
|
|
206
|
+
* from the host.
|
|
207
|
+
*
|
|
208
|
+
* Registering the same URI twice REPLACES the previous descriptor
|
|
209
|
+
* — intentional, since the host re-introspects when the source changes.
|
|
142
210
|
*
|
|
143
211
|
* # Errors
|
|
144
212
|
*
|
|
145
213
|
* - Malformed JSON / missing required fields → JS `Error` with the
|
|
146
214
|
* underlying `serde_json` message.
|
|
147
|
-
*
|
|
148
|
-
* Implementation: thin shim over the pure-Rust
|
|
149
|
-
* [`Self::register_inferred_descriptor_native`] helper.
|
|
215
|
+
* - The workspace is busy.
|
|
150
216
|
*/
|
|
151
217
|
registerInferredDescriptor(descriptor_json: string): void;
|
|
152
218
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
*
|
|
219
|
+
* Every classified span of the file: `{ range, kind, modifiers }` rows in
|
|
220
|
+
* source order, `kind` and `modifiers` by legend NAME. An editor lays these
|
|
221
|
+
* over its lexical highlighting — see [`ide::SemanticTokenRow`].
|
|
222
|
+
*
|
|
223
|
+
* # Errors
|
|
224
|
+
*
|
|
225
|
+
* Returns a JS error if the workspace is busy, or if the result fails to
|
|
226
|
+
* serialize to `JsValue`. An unknown handle is an empty array.
|
|
227
|
+
*/
|
|
228
|
+
semanticTokens(handle: FileHandle): any;
|
|
229
|
+
/**
|
|
230
|
+
* Replace the connection map `@name/…` expands against, as
|
|
231
|
+
* `Host.connections()` answers it.
|
|
232
|
+
*
|
|
233
|
+
* # Errors
|
|
234
|
+
*
|
|
235
|
+
* Returns a JS error if `connections` is not a string-to-string record, or
|
|
236
|
+
* if the workspace is busy.
|
|
237
|
+
*/
|
|
238
|
+
setConnections(connections: any): void;
|
|
239
|
+
/**
|
|
240
|
+
* The data sources the file at `handle` reads — see
|
|
241
|
+
* [`fossil_lineage::program_sources`].
|
|
165
242
|
*
|
|
166
243
|
* # Errors
|
|
167
244
|
*
|
|
168
|
-
* Returns a JS error if
|
|
245
|
+
* Returns a JS error if `handle` is unknown, if the workspace is busy, or
|
|
246
|
+
* if serialization fails.
|
|
169
247
|
*/
|
|
170
|
-
|
|
248
|
+
sources(handle: FileHandle): any;
|
|
171
249
|
/**
|
|
172
250
|
* Apply an edit to an open file. Mutates the SAME `SourceFile` via the
|
|
173
251
|
* Salsa [`salsa::Setter`] (`set_text`) — this BUMPS THE REVISION, the
|
|
174
|
-
* real cancellation trigger
|
|
252
|
+
* real cancellation trigger: any in-flight analysis from the
|
|
175
253
|
* previous keystroke observes the new revision at its next cooperative
|
|
176
254
|
* checkpoint. NO new `SourceFile` is interned — the Salsa input
|
|
177
255
|
* identity stays stable across the file's lifetime, so memoised
|
|
@@ -180,47 +258,62 @@ export class FossilPlayground {
|
|
|
180
258
|
*
|
|
181
259
|
* # Errors
|
|
182
260
|
*
|
|
183
|
-
* Returns a JS error if `handle` was never opened or was already closed
|
|
261
|
+
* Returns a JS error if `handle` was never opened or was already closed,
|
|
262
|
+
* or if the workspace is already inside another call — see the type-level
|
|
263
|
+
* note on [`WasmWorkspace`]. **Neither leaves the workspace unusable**,
|
|
264
|
+
* which is the whole reason this method takes `&self`.
|
|
184
265
|
*/
|
|
185
266
|
update_file(handle: FileHandle, contents: string): void;
|
|
186
267
|
}
|
|
187
268
|
|
|
188
269
|
/**
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
* `packages/codemirror-fossil/src/tags.ts`) uses this to translate
|
|
194
|
-
* LSP `semanticTokens/full` response indices into highlight tag names.
|
|
195
|
-
*
|
|
196
|
-
* Delegates to [`fossil_ide::semantic_legend`] (the 06-07 authoritative
|
|
197
|
-
* definition) — NO duplicate legend definition lives here.
|
|
270
|
+
* The providers this host installs (`io.csv`, `io.rdf`, `io.shex`, …) as a JS
|
|
271
|
+
* array of `{ name, extensions, kind }`. Pure projection of the provider
|
|
272
|
+
* registry — no parsing, no db. `kind` is read off each row's capabilities, so
|
|
273
|
+
* the two shape-document rows come back as `Schema`.
|
|
198
274
|
*
|
|
199
275
|
* # Errors
|
|
276
|
+
* Returns a JS error only if the result fails to serialize to `JsValue`.
|
|
277
|
+
*/
|
|
278
|
+
export function providers(): any;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Parse `program` and return its external references — every data URI +
|
|
282
|
+
* `schema =` argument, each tagged with its `@conn` alias (`null` for a direct
|
|
283
|
+
* path) and role (`Data` / `Schema`) — as a JS array of
|
|
284
|
+
* `{ connection, path, role }`. Parse-only; the host resolves `@conn` →
|
|
285
|
+
* `{base}/path` itself (its data-plane job, kept out of fossil's semantics).
|
|
200
286
|
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
287
|
+
* # Errors
|
|
288
|
+
* Returns a JS error only if the result fails to serialize to `JsValue`.
|
|
203
289
|
*/
|
|
204
|
-
export function
|
|
290
|
+
export function refs(program: string): any;
|
|
205
291
|
|
|
206
292
|
/**
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
293
|
+
* The name of every [`TokenRow::kind`], indexed BY that kind.
|
|
294
|
+
*
|
|
295
|
+
* `token_kinds()[row.kind]` is the variant name — `"Comment"`, `"KwFrom"`,
|
|
296
|
+
* `"String"`. A host maps names to highlight categories and never writes a
|
|
297
|
+
* discriminant down, which is the only version of this contract that survives
|
|
298
|
+
* a reorder of the lexer.
|
|
299
|
+
*
|
|
300
|
+
* Semantic tokens make the same move one step further: `semanticTokens()`
|
|
301
|
+
* sends the legend's names themselves, so no index crosses at all.
|
|
210
302
|
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
303
|
+
* A kind past the end of the array is a variant appended by a newer compiler
|
|
304
|
+
* than the host was built against. That is BACKWARDS-COMPATIBLE by
|
|
305
|
+
* construction: the host sees `undefined` and styles the span as plain text.
|
|
213
306
|
*
|
|
214
307
|
* # Errors
|
|
215
308
|
*
|
|
216
|
-
* Returns a JS error
|
|
309
|
+
* Returns a JS error only if `serde_wasm_bindgen` fails to serialise a
|
|
310
|
+
* `Vec<&str>` (impossible in practice).
|
|
217
311
|
*/
|
|
218
|
-
export function
|
|
312
|
+
export function tokenKinds(): any;
|
|
219
313
|
|
|
220
314
|
/**
|
|
221
315
|
* `JS`-facing tokenize. Returns the same row stream as [`tokenize_native`],
|
|
222
|
-
* serialised via `serde_wasm_bindgen`.
|
|
223
|
-
* `@fossil-lang/codemirror-fossil`'s `StreamParser` (plan 08-08).
|
|
316
|
+
* serialised via `serde_wasm_bindgen`.
|
|
224
317
|
*
|
|
225
318
|
* # Errors
|
|
226
319
|
*
|
|
@@ -235,28 +328,33 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
235
328
|
|
|
236
329
|
export interface InitOutput {
|
|
237
330
|
readonly memory: WebAssembly.Memory;
|
|
238
|
-
readonly start_lsp_worker: () => [number, number];
|
|
239
331
|
readonly tokenize: (a: number, b: number) => [number, number, number];
|
|
240
|
-
readonly
|
|
332
|
+
readonly tokenKinds: () => [number, number, number];
|
|
241
333
|
readonly __wbg_filehandle_free: (a: number, b: number) => void;
|
|
242
|
-
readonly
|
|
243
|
-
readonly
|
|
244
|
-
readonly
|
|
245
|
-
readonly
|
|
246
|
-
readonly
|
|
247
|
-
readonly
|
|
248
|
-
readonly
|
|
249
|
-
readonly
|
|
250
|
-
readonly
|
|
251
|
-
readonly
|
|
252
|
-
readonly
|
|
334
|
+
readonly __wbg_fossilworkspace_free: (a: number, b: number) => void;
|
|
335
|
+
readonly fossilworkspace_new: () => number;
|
|
336
|
+
readonly fossilworkspace_open_file: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
337
|
+
readonly fossilworkspace_update_file: (a: number, b: number, c: number, d: number) => [number, number];
|
|
338
|
+
readonly fossilworkspace_close_file: (a: number, b: number) => [number, number];
|
|
339
|
+
readonly fossilworkspace_check: (a: number) => [number, number, number];
|
|
340
|
+
readonly fossilworkspace_diagnostics_for: (a: number, b: number) => [number, number, number];
|
|
341
|
+
readonly fossilworkspace_setConnections: (a: number, b: any) => [number, number];
|
|
342
|
+
readonly fossilworkspace_missingDocuments: (a: number, b: number) => [number, number, number];
|
|
343
|
+
readonly fossilworkspace_registerDocument: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
344
|
+
readonly fossilworkspace_sources: (a: number, b: number) => [number, number, number];
|
|
345
|
+
readonly fossilworkspace_hover: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
346
|
+
readonly fossilworkspace_completions: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
347
|
+
readonly fossilworkspace_gotoDefinition: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
348
|
+
readonly fossilworkspace_semanticTokens: (a: number, b: number) => [number, number, number];
|
|
349
|
+
readonly fossilworkspace_registerInferredDescriptor: (a: number, b: number, c: number) => [number, number];
|
|
350
|
+
readonly providers: () => [number, number, number];
|
|
351
|
+
readonly refs: (a: number, b: number) => [number, number, number];
|
|
253
352
|
readonly __wbindgen_malloc_command_export: (a: number, b: number) => number;
|
|
254
353
|
readonly __wbindgen_realloc_command_export: (a: number, b: number, c: number, d: number) => number;
|
|
255
354
|
readonly __wbindgen_exn_store_command_export: (a: number) => void;
|
|
256
355
|
readonly __externref_table_alloc_command_export: () => number;
|
|
257
356
|
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
258
357
|
readonly __wbindgen_free_command_export: (a: number, b: number, c: number) => void;
|
|
259
|
-
readonly __wbindgen_destroy_closure_command_export: (a: number, b: number) => void;
|
|
260
358
|
readonly __externref_table_dealloc_command_export: (a: number) => void;
|
|
261
359
|
readonly __wbindgen_start: () => void;
|
|
262
360
|
}
|