plotters-skill 0.1.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 +212 -0
- package/SKILL.md +535 -0
- package/index.js +153 -0
- package/node/index.d.ts +372 -0
- package/node/index.js +586 -0
- package/node/plotters-skill-addon.darwin-arm64.node +0 -0
- package/node/plotters-skill-addon.darwin-x64.node +0 -0
- package/node/plotters-skill-addon.linux-arm64-gnu.node +0 -0
- package/node/plotters-skill-addon.linux-x64-gnu.node +0 -0
- package/node/plotters-skill-addon.win32-x64-msvc.node +0 -0
- package/package.json +39 -0
- package/wasm/plotters_skill_wasm.d.ts +422 -0
- package/wasm/plotters_skill_wasm.js +1483 -0
- package/wasm/plotters_skill_wasm_bg.wasm +0 -0
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A flexible Cartesian axes that supports mixed series (line, scatter, bar,
|
|
6
|
+
* step, area) — similar to matplotlib's `Axes` object.
|
|
7
|
+
*/
|
|
8
|
+
export class Axes {
|
|
9
|
+
private constructor();
|
|
10
|
+
free(): void;
|
|
11
|
+
[Symbol.dispose](): void;
|
|
12
|
+
/**
|
|
13
|
+
* Add a vertical bar series, similar to `ax.bar(x, height)`.
|
|
14
|
+
*/
|
|
15
|
+
bar(x: Float64Array, heights: Float64Array, options: any): void;
|
|
16
|
+
/**
|
|
17
|
+
* `ChartBuilder::build_cartesian_2d(x_min..x_max, y_min..y_max)` shorthand.
|
|
18
|
+
*/
|
|
19
|
+
buildCartesian2d(x_min: number, x_max: number, y_min: number, y_max: number): void;
|
|
20
|
+
captionFontFamily(family: string): void;
|
|
21
|
+
captionFontSize(size: number): void;
|
|
22
|
+
clear(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Configure mesh/grid — maps to plotters' `chart.configure_mesh()`.
|
|
25
|
+
*/
|
|
26
|
+
configureMesh(options: any): void;
|
|
27
|
+
/**
|
|
28
|
+
* Configure legend — maps to plotters' `chart.configure_series_labels()`.
|
|
29
|
+
*/
|
|
30
|
+
configureSeriesLabels(options: any): void;
|
|
31
|
+
/**
|
|
32
|
+
* Render onto an HTML canvas element.
|
|
33
|
+
*/
|
|
34
|
+
draw(canvas: HTMLCanvasElement): void;
|
|
35
|
+
figsize(w: number, h: number): void;
|
|
36
|
+
/**
|
|
37
|
+
* Add a filled-area series, similar to `ax.fill_between(x, y1)`.
|
|
38
|
+
*/
|
|
39
|
+
fillBetween(x: Float64Array, y1: Float64Array, options: any): void;
|
|
40
|
+
grid(show: boolean): void;
|
|
41
|
+
legend(show: boolean): void;
|
|
42
|
+
margin(px: number): void;
|
|
43
|
+
marginBottom(px: number): void;
|
|
44
|
+
marginLeft(px: number): void;
|
|
45
|
+
marginRight(px: number): void;
|
|
46
|
+
marginTop(px: number): void;
|
|
47
|
+
/**
|
|
48
|
+
* Add a line series, similar to `ax.plot(x, y)`.
|
|
49
|
+
*/
|
|
50
|
+
plot(x: Float64Array, y: Float64Array, options: any): void;
|
|
51
|
+
/**
|
|
52
|
+
* Render to SVG string.
|
|
53
|
+
*/
|
|
54
|
+
render(): string;
|
|
55
|
+
rightYLabelAreaSize(px: number): void;
|
|
56
|
+
/**
|
|
57
|
+
* Add a scatter series, similar to `ax.scatter(x, y)`.
|
|
58
|
+
*/
|
|
59
|
+
scatter(x: Float64Array, y: Float64Array, options: any): void;
|
|
60
|
+
/**
|
|
61
|
+
* Add a step-function series, similar to `ax.step(x, y)`.
|
|
62
|
+
*/
|
|
63
|
+
step(x: Float64Array, y: Float64Array, options: any): void;
|
|
64
|
+
title(t: string): void;
|
|
65
|
+
topXLabelAreaSize(px: number): void;
|
|
66
|
+
xLabelAreaSize(px: number): void;
|
|
67
|
+
xlabel(l: string): void;
|
|
68
|
+
xlim(lo: number, hi: number): void;
|
|
69
|
+
yLabelAreaSize(px: number): void;
|
|
70
|
+
ylabel(l: string): void;
|
|
71
|
+
ylim(lo: number, hi: number): void;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* A figure/canvas for creating plots, mirroring matplotlib's pyplot interface.
|
|
76
|
+
*
|
|
77
|
+
* All rendering outputs SVG (no bitmap/font dependencies in WASM).
|
|
78
|
+
*/
|
|
79
|
+
export class Figure {
|
|
80
|
+
private constructor();
|
|
81
|
+
free(): void;
|
|
82
|
+
[Symbol.dispose](): void;
|
|
83
|
+
/**
|
|
84
|
+
* Add a box plot, similar to `plt.boxplot(datasets, tick_labels=..., showmeans=...)`.
|
|
85
|
+
*
|
|
86
|
+
* `datasets` is a JS array of arrays — each inner array produces one box.
|
|
87
|
+
*/
|
|
88
|
+
boxplot(datasets: any, options: any): void;
|
|
89
|
+
/**
|
|
90
|
+
* Add a candlestick chart, similar to `mplfinance.plot(df, type='candle')`.
|
|
91
|
+
*
|
|
92
|
+
* `data` is a JS array of `[open, high, low, close]` arrays.
|
|
93
|
+
*/
|
|
94
|
+
candlestick(data: any, options: any): void;
|
|
95
|
+
/**
|
|
96
|
+
* Remove all plot elements, keeping title / labels / dimensions.
|
|
97
|
+
*
|
|
98
|
+
* Use this between frames when animating on a canvas:
|
|
99
|
+
* ```js
|
|
100
|
+
* fig.clear();
|
|
101
|
+
* fig.plot(newX, newY, { color: 'blue' });
|
|
102
|
+
* fig.draw(canvas);
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
clear(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Render the figure directly onto an HTML `<canvas>` element.
|
|
108
|
+
*
|
|
109
|
+
* ```js
|
|
110
|
+
* const canvas = document.getElementById('my-canvas');
|
|
111
|
+
* fig.draw(canvas);
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
draw(canvas: HTMLCanvasElement): void;
|
|
115
|
+
/**
|
|
116
|
+
* Set figure dimensions in pixels.
|
|
117
|
+
*/
|
|
118
|
+
figsize(width: number, height: number): void;
|
|
119
|
+
/**
|
|
120
|
+
* Add an area chart, similar to `plt.fill_between(x, y1, y2=0, color=..., alpha=...)`.
|
|
121
|
+
*/
|
|
122
|
+
fillBetween(x: Float64Array, y1: Float64Array, options: any): void;
|
|
123
|
+
/**
|
|
124
|
+
* Show or hide grid lines.
|
|
125
|
+
*/
|
|
126
|
+
grid(show: boolean): void;
|
|
127
|
+
/**
|
|
128
|
+
* Add a histogram, similar to `plt.hist(data, bins=10, ...)`.
|
|
129
|
+
*
|
|
130
|
+
* `options` is a JS object with optional keys: `bins`, `color`, `alpha`,
|
|
131
|
+
* `label`, `rangeMin`, `rangeMax`.
|
|
132
|
+
*/
|
|
133
|
+
hist(data: Float64Array, options: any): void;
|
|
134
|
+
/**
|
|
135
|
+
* Set chart margin in pixels.
|
|
136
|
+
*/
|
|
137
|
+
margin(pixels: number): void;
|
|
138
|
+
/**
|
|
139
|
+
* Add a pie or donut chart, similar to `plt.pie(values, labels=..., colors=...)`.
|
|
140
|
+
*/
|
|
141
|
+
pie(values: Float64Array, options: any): void;
|
|
142
|
+
/**
|
|
143
|
+
* Add a line series, similar to `plt.plot(x, y, color=..., label=...)`.
|
|
144
|
+
*/
|
|
145
|
+
plot(x: Float64Array, y: Float64Array, options: any): void;
|
|
146
|
+
/**
|
|
147
|
+
* Render the figure to an SVG string.
|
|
148
|
+
*
|
|
149
|
+
* In the browser, inject the result into the DOM:
|
|
150
|
+
* ```js
|
|
151
|
+
* document.getElementById('chart').innerHTML = fig.render();
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
render(): string;
|
|
155
|
+
/**
|
|
156
|
+
* Set the figure title.
|
|
157
|
+
*/
|
|
158
|
+
title(title: string): void;
|
|
159
|
+
/**
|
|
160
|
+
* Set the x-axis label.
|
|
161
|
+
*/
|
|
162
|
+
xlabel(label: string): void;
|
|
163
|
+
/**
|
|
164
|
+
* Set explicit x-axis limits, similar to `ax.set_xlim(min, max)`.
|
|
165
|
+
*/
|
|
166
|
+
xlim(min: number, max: number): void;
|
|
167
|
+
/**
|
|
168
|
+
* Set the y-axis label.
|
|
169
|
+
*/
|
|
170
|
+
ylabel(label: string): void;
|
|
171
|
+
/**
|
|
172
|
+
* Set explicit y-axis limits, similar to `ax.set_ylim(min, max)`.
|
|
173
|
+
*/
|
|
174
|
+
ylim(min: number, max: number): void;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* A flexible multi-row figure layout where each row can have a different
|
|
179
|
+
* number of columns.
|
|
180
|
+
*/
|
|
181
|
+
export class GridFigure {
|
|
182
|
+
private constructor();
|
|
183
|
+
free(): void;
|
|
184
|
+
[Symbol.dispose](): void;
|
|
185
|
+
/**
|
|
186
|
+
* Add a new row with `ncols` columns.
|
|
187
|
+
*/
|
|
188
|
+
addRow(ncols: number): void;
|
|
189
|
+
/**
|
|
190
|
+
* Get the figure at `(row, col)` as a standalone `Figure`.
|
|
191
|
+
*
|
|
192
|
+
* Configure it, then put it back with `setAx(row, col, fig)`.
|
|
193
|
+
*/
|
|
194
|
+
ax(row: number, col: number): Figure;
|
|
195
|
+
/**
|
|
196
|
+
* Render the grid figure directly onto an HTML `<canvas>` element.
|
|
197
|
+
*/
|
|
198
|
+
draw(canvas: HTMLCanvasElement): void;
|
|
199
|
+
/**
|
|
200
|
+
* Set the overall figure size in pixels.
|
|
201
|
+
*/
|
|
202
|
+
figsize(width: number, height: number): void;
|
|
203
|
+
/**
|
|
204
|
+
* Number of columns in a specific row.
|
|
205
|
+
*/
|
|
206
|
+
ncols(row: number): number;
|
|
207
|
+
/**
|
|
208
|
+
* Number of rows in the grid.
|
|
209
|
+
*/
|
|
210
|
+
nrows(): number;
|
|
211
|
+
/**
|
|
212
|
+
* Render the grid figure to an SVG string.
|
|
213
|
+
*/
|
|
214
|
+
render(): string;
|
|
215
|
+
/**
|
|
216
|
+
* Put a configured figure back into the grid at `(row, col)`.
|
|
217
|
+
*/
|
|
218
|
+
setAx(row: number, col: number, fig: Figure): void;
|
|
219
|
+
/**
|
|
220
|
+
* Set the overall super-title for the grid.
|
|
221
|
+
*/
|
|
222
|
+
suptitle(title: string): void;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* A grid of sub-figures, similar to matplotlib's `fig, axes = plt.subplots(nrows, ncols)`.
|
|
227
|
+
*/
|
|
228
|
+
export class SubPlots {
|
|
229
|
+
private constructor();
|
|
230
|
+
free(): void;
|
|
231
|
+
[Symbol.dispose](): void;
|
|
232
|
+
/**
|
|
233
|
+
* Get the figure at `(row, col)` as a standalone `Figure`.
|
|
234
|
+
*
|
|
235
|
+
* Configure it, then put it back with `setAx(row, col, fig)`.
|
|
236
|
+
*/
|
|
237
|
+
ax(row: number, col: number): Figure;
|
|
238
|
+
/**
|
|
239
|
+
* Render the subplot grid directly onto an HTML `<canvas>` element.
|
|
240
|
+
*/
|
|
241
|
+
draw(canvas: HTMLCanvasElement): void;
|
|
242
|
+
/**
|
|
243
|
+
* Set the overall figure size in pixels.
|
|
244
|
+
*/
|
|
245
|
+
figsize(width: number, height: number): void;
|
|
246
|
+
/**
|
|
247
|
+
* Number of columns in the grid.
|
|
248
|
+
*/
|
|
249
|
+
ncols(): number;
|
|
250
|
+
/**
|
|
251
|
+
* Number of rows in the grid.
|
|
252
|
+
*/
|
|
253
|
+
nrows(): number;
|
|
254
|
+
/**
|
|
255
|
+
* Render the subplot grid to an SVG string.
|
|
256
|
+
*/
|
|
257
|
+
render(): string;
|
|
258
|
+
/**
|
|
259
|
+
* Put a configured figure back into the grid at `(row, col)`.
|
|
260
|
+
*/
|
|
261
|
+
setAx(row: number, col: number, fig: Figure): void;
|
|
262
|
+
/**
|
|
263
|
+
* Set the overall super-title for the grid.
|
|
264
|
+
*/
|
|
265
|
+
suptitle(title: string): void;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Create a new flexible Axes, similar to `fig, ax = plt.subplots()`.
|
|
270
|
+
*/
|
|
271
|
+
export function axes(): Axes;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Create a new figure, equivalent to `plt.figure()`.
|
|
275
|
+
*/
|
|
276
|
+
export function figure(): Figure;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Create an empty grid figure. Add rows with `addRow(ncols)`.
|
|
280
|
+
*
|
|
281
|
+
* Unlike `subplots(nrows, ncols)` which creates a uniform grid, `gridFigure()`
|
|
282
|
+
* lets each row have a different number of columns.
|
|
283
|
+
*
|
|
284
|
+
* ```js
|
|
285
|
+
* const grid = gridFigure();
|
|
286
|
+
* grid.addRow(2); // row 0: two columns
|
|
287
|
+
* grid.addRow(1); // row 1: one full-width column
|
|
288
|
+
* grid.figsize(1200, 800);
|
|
289
|
+
* grid.suptitle("Mixed Layout");
|
|
290
|
+
*
|
|
291
|
+
* let ax = grid.ax(0, 0);
|
|
292
|
+
* ax.hist(data, { bins: 10 });
|
|
293
|
+
* grid.setAx(0, 0, ax);
|
|
294
|
+
*
|
|
295
|
+
* document.getElementById('chart').innerHTML = grid.render();
|
|
296
|
+
* ```
|
|
297
|
+
*/
|
|
298
|
+
export function gridFigure(): GridFigure;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Create a subplot grid, equivalent to `plt.subplots(nrows, ncols)`.
|
|
302
|
+
*
|
|
303
|
+
* Returns a grid of figures that can each hold their own chart.
|
|
304
|
+
*
|
|
305
|
+
* ```js
|
|
306
|
+
* const grid = subplots(2, 2);
|
|
307
|
+
* const ax = grid.ax(0, 0);
|
|
308
|
+
* ax.hist(data, { bins: 10 });
|
|
309
|
+
* ax.title("Distribution");
|
|
310
|
+
* grid.setAx(0, 0, ax);
|
|
311
|
+
* document.getElementById('chart').innerHTML = grid.render();
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
export function subplots(nrows: number, ncols: number): SubPlots;
|
|
315
|
+
|
|
316
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
317
|
+
|
|
318
|
+
export interface InitOutput {
|
|
319
|
+
readonly memory: WebAssembly.Memory;
|
|
320
|
+
readonly __wbg_axes_free: (a: number, b: number) => void;
|
|
321
|
+
readonly __wbg_figure_free: (a: number, b: number) => void;
|
|
322
|
+
readonly __wbg_gridfigure_free: (a: number, b: number) => void;
|
|
323
|
+
readonly __wbg_subplots_free: (a: number, b: number) => void;
|
|
324
|
+
readonly axes: () => number;
|
|
325
|
+
readonly axes_bar: (a: number, b: number, c: number, d: number, e: number, f: any) => [number, number];
|
|
326
|
+
readonly axes_buildCartesian2d: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
327
|
+
readonly axes_captionFontFamily: (a: number, b: number, c: number) => void;
|
|
328
|
+
readonly axes_captionFontSize: (a: number, b: number) => void;
|
|
329
|
+
readonly axes_clear: (a: number) => void;
|
|
330
|
+
readonly axes_configureMesh: (a: number, b: any) => [number, number];
|
|
331
|
+
readonly axes_configureSeriesLabels: (a: number, b: any) => [number, number];
|
|
332
|
+
readonly axes_draw: (a: number, b: any) => [number, number];
|
|
333
|
+
readonly axes_figsize: (a: number, b: number, c: number) => void;
|
|
334
|
+
readonly axes_fillBetween: (a: number, b: number, c: number, d: number, e: number, f: any) => [number, number];
|
|
335
|
+
readonly axes_grid: (a: number, b: number) => void;
|
|
336
|
+
readonly axes_legend: (a: number, b: number) => void;
|
|
337
|
+
readonly axes_margin: (a: number, b: number) => void;
|
|
338
|
+
readonly axes_marginBottom: (a: number, b: number) => void;
|
|
339
|
+
readonly axes_marginLeft: (a: number, b: number) => void;
|
|
340
|
+
readonly axes_marginRight: (a: number, b: number) => void;
|
|
341
|
+
readonly axes_marginTop: (a: number, b: number) => void;
|
|
342
|
+
readonly axes_plot: (a: number, b: number, c: number, d: number, e: number, f: any) => [number, number];
|
|
343
|
+
readonly axes_render: (a: number) => [number, number, number, number];
|
|
344
|
+
readonly axes_rightYLabelAreaSize: (a: number, b: number) => void;
|
|
345
|
+
readonly axes_scatter: (a: number, b: number, c: number, d: number, e: number, f: any) => [number, number];
|
|
346
|
+
readonly axes_step: (a: number, b: number, c: number, d: number, e: number, f: any) => [number, number];
|
|
347
|
+
readonly axes_title: (a: number, b: number, c: number) => void;
|
|
348
|
+
readonly axes_topXLabelAreaSize: (a: number, b: number) => void;
|
|
349
|
+
readonly axes_xLabelAreaSize: (a: number, b: number) => void;
|
|
350
|
+
readonly axes_xlabel: (a: number, b: number, c: number) => void;
|
|
351
|
+
readonly axes_xlim: (a: number, b: number, c: number) => void;
|
|
352
|
+
readonly axes_yLabelAreaSize: (a: number, b: number) => void;
|
|
353
|
+
readonly axes_ylabel: (a: number, b: number, c: number) => void;
|
|
354
|
+
readonly axes_ylim: (a: number, b: number, c: number) => void;
|
|
355
|
+
readonly figure: () => number;
|
|
356
|
+
readonly figure_boxplot: (a: number, b: any, c: any) => [number, number];
|
|
357
|
+
readonly figure_candlestick: (a: number, b: any, c: any) => [number, number];
|
|
358
|
+
readonly figure_clear: (a: number) => void;
|
|
359
|
+
readonly figure_draw: (a: number, b: any) => [number, number];
|
|
360
|
+
readonly figure_figsize: (a: number, b: number, c: number) => void;
|
|
361
|
+
readonly figure_fillBetween: (a: number, b: number, c: number, d: number, e: number, f: any) => [number, number];
|
|
362
|
+
readonly figure_grid: (a: number, b: number) => void;
|
|
363
|
+
readonly figure_hist: (a: number, b: number, c: number, d: any) => [number, number];
|
|
364
|
+
readonly figure_margin: (a: number, b: number) => void;
|
|
365
|
+
readonly figure_pie: (a: number, b: number, c: number, d: any) => [number, number];
|
|
366
|
+
readonly figure_plot: (a: number, b: number, c: number, d: number, e: number, f: any) => [number, number];
|
|
367
|
+
readonly figure_render: (a: number) => [number, number, number, number];
|
|
368
|
+
readonly figure_title: (a: number, b: number, c: number) => void;
|
|
369
|
+
readonly figure_xlabel: (a: number, b: number, c: number) => void;
|
|
370
|
+
readonly figure_ylabel: (a: number, b: number, c: number) => void;
|
|
371
|
+
readonly gridFigure: () => number;
|
|
372
|
+
readonly gridfigure_addRow: (a: number, b: number) => void;
|
|
373
|
+
readonly gridfigure_ax: (a: number, b: number, c: number) => number;
|
|
374
|
+
readonly gridfigure_draw: (a: number, b: any) => [number, number];
|
|
375
|
+
readonly gridfigure_figsize: (a: number, b: number, c: number) => void;
|
|
376
|
+
readonly gridfigure_ncols: (a: number, b: number) => number;
|
|
377
|
+
readonly gridfigure_nrows: (a: number) => number;
|
|
378
|
+
readonly gridfigure_render: (a: number) => [number, number, number, number];
|
|
379
|
+
readonly gridfigure_setAx: (a: number, b: number, c: number, d: number) => void;
|
|
380
|
+
readonly gridfigure_suptitle: (a: number, b: number, c: number) => void;
|
|
381
|
+
readonly subplots: (a: number, b: number) => number;
|
|
382
|
+
readonly subplots_ax: (a: number, b: number, c: number) => number;
|
|
383
|
+
readonly subplots_draw: (a: number, b: any) => [number, number];
|
|
384
|
+
readonly subplots_figsize: (a: number, b: number, c: number) => void;
|
|
385
|
+
readonly subplots_ncols: (a: number) => number;
|
|
386
|
+
readonly subplots_nrows: (a: number) => number;
|
|
387
|
+
readonly subplots_render: (a: number) => [number, number, number, number];
|
|
388
|
+
readonly subplots_setAx: (a: number, b: number, c: number, d: number) => void;
|
|
389
|
+
readonly subplots_suptitle: (a: number, b: number, c: number) => void;
|
|
390
|
+
readonly figure_xlim: (a: number, b: number, c: number) => void;
|
|
391
|
+
readonly figure_ylim: (a: number, b: number, c: number) => void;
|
|
392
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
393
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
394
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
395
|
+
readonly __externref_table_alloc: () => number;
|
|
396
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
397
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
398
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
399
|
+
readonly __wbindgen_start: () => void;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
406
|
+
* a precompiled `WebAssembly.Module`.
|
|
407
|
+
*
|
|
408
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
409
|
+
*
|
|
410
|
+
* @returns {InitOutput}
|
|
411
|
+
*/
|
|
412
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
416
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
417
|
+
*
|
|
418
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
419
|
+
*
|
|
420
|
+
* @returns {Promise<InitOutput>}
|
|
421
|
+
*/
|
|
422
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|