mons-web 0.1.134 → 0.2.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 +88 -53
- package/mons-web.d.ts +73 -211
- package/mons-web.js +1 -1619
- package/package.json +4 -7
- package/mons-web_bg.wasm +0 -0
- package/snippets/mons-rust-cba9eedc04d5b215/inline0.js +0 -1
package/README.md
CHANGED
|
@@ -1,53 +1,88 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
The
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
# Mons TypeScript engine
|
|
2
|
+
|
|
3
|
+
The Mons rules engine is implemented in strict TypeScript and distributed as two
|
|
4
|
+
dependency-free npm packages:
|
|
5
|
+
|
|
6
|
+
- `mons-web` is an ES module for browsers and bundlers.
|
|
7
|
+
- `mons-rust` is the existing CommonJS package for Node.js. Its historical package
|
|
8
|
+
name is unchanged for compatibility.
|
|
9
|
+
|
|
10
|
+
Both packages expose the same 23 named game APIs and the same TypeScript declarations.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { GameVariant, MonsGameModel } from "mons-web";
|
|
14
|
+
|
|
15
|
+
const game = MonsGameModel.new(GameVariant.Classic);
|
|
16
|
+
const output = game.process_input_fen("l10,5;l9,4");
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
const { GameVariant, MonsGameModel } = require("mons-rust");
|
|
21
|
+
|
|
22
|
+
const game = MonsGameModel.new(GameVariant.Classic);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Migrating `mons-web` initialization
|
|
26
|
+
|
|
27
|
+
`mons-web` no longer has a default initializer or an `initSync` export. Remove the
|
|
28
|
+
default import and initialization call; named imports are ready to use immediately.
|
|
29
|
+
The generated `InitInput`, `SyncInitInput`, and `InitOutput` TypeScript types are
|
|
30
|
+
removed with those loaders.
|
|
31
|
+
|
|
32
|
+
```diff
|
|
33
|
+
-import initMonsWeb, { MonsGameModel } from "mons-web";
|
|
34
|
+
-await initMonsWeb();
|
|
35
|
+
+import { MonsGameModel } from "mons-web";
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The named API is otherwise preserved, including enum values, FEN formats, model
|
|
39
|
+
classes, event ordering, random automoves, and smart-automove preferences.
|
|
40
|
+
|
|
41
|
+
Incoming strings retain the previous runtime normalization: unpaired UTF-16
|
|
42
|
+
surrogates become U+FFFD before parsing or echoing. One intentional error-policy
|
|
43
|
+
change applies to malformed data: native `RuntimeError("unreachable")` traps from
|
|
44
|
+
invalid UTF-8 slice boundaries or genuine board/location bounds failures are
|
|
45
|
+
deterministic TypeScript `RangeError`s. Wrapped location indices that resolve inside
|
|
46
|
+
the board remain compatible aliases.
|
|
47
|
+
|
|
48
|
+
Published JavaScript targets ES2020. The Node package uses Node's built-in performance
|
|
49
|
+
and cryptographic-random services directly; the browser package uses the corresponding
|
|
50
|
+
`globalThis` APIs. Node.js 22.13 through 22.x, or Node.js 24 or newer, is required
|
|
51
|
+
only for repository development and release tooling.
|
|
52
|
+
|
|
53
|
+
## Validation
|
|
54
|
+
|
|
55
|
+
Install the workspace with Node.js 22.13 through 22.x, or Node.js 24 or newer, and
|
|
56
|
+
run the standard checks:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
npm ci --engine-strict
|
|
60
|
+
npm run format:check
|
|
61
|
+
npm run lint
|
|
62
|
+
npm run typecheck
|
|
63
|
+
npm run build
|
|
64
|
+
npm test
|
|
65
|
+
npm run test:automove-parity
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Run `./scripts/run-rules-tests.sh` with no options to replay the deterministic
|
|
69
|
+
compressed stream of 699,994 canonical unique rules transitions recovered from
|
|
70
|
+
699,999 historical raw fixtures. The command validates and streams the corpus without
|
|
71
|
+
unpacking or rewriting it.
|
|
72
|
+
|
|
73
|
+
Run `node ./scripts/check-complete-games.cjs` to validate the immutable public corpus
|
|
74
|
+
of 1,527 complete real-player games. Run `npm run test:complete-games` to replay all
|
|
75
|
+
25,185 turns and 169,480 inputs through the TypeScript engine across all 12 variants.
|
|
76
|
+
|
|
77
|
+
## Release
|
|
78
|
+
|
|
79
|
+
Run `./publish.sh --check-only` to execute the complete Node-only validation, build
|
|
80
|
+
both package tarballs, and perform npm dry runs without publishing. Publishing is an
|
|
81
|
+
explicit release operation: run `./publish.sh` from a clean worktree only when both
|
|
82
|
+
packages should be released to the `latest` tag.
|
|
83
|
+
|
|
84
|
+
A real publish acquires the transient `mons-npm-publish-lock` tag on `origin`, or on
|
|
85
|
+
the shared remote named by `MONS_PUBLISH_LOCK_REMOTE`. All publishers must use this
|
|
86
|
+
script and the same remote for the lock to serialize releases across hosts. If a
|
|
87
|
+
process terminates without releasing the tag, the script prints inspection and
|
|
88
|
+
lease-protected stale-lock recovery commands.
|
package/mons-web.d.ts
CHANGED
|
@@ -10,52 +10,27 @@
|
|
|
10
10
|
export function winner(fen_w: string, fen_b: string, flat_moves_string_w: string, flat_moves_string_b: string): string;
|
|
11
11
|
/**
|
|
12
12
|
*/
|
|
13
|
-
export enum
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Mystic = 4,
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
*/
|
|
38
|
-
export enum Modifier {
|
|
39
|
-
SelectPotion = 0,
|
|
40
|
-
SelectBomb = 1,
|
|
41
|
-
Cancel = 2,
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
*/
|
|
45
|
-
export enum OutputModelKind {
|
|
46
|
-
InvalidInput = 0,
|
|
47
|
-
LocationsToStartFrom = 1,
|
|
48
|
-
NextInputOptions = 2,
|
|
49
|
-
Events = 3,
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
*/
|
|
53
|
-
export enum ItemModelKind {
|
|
54
|
-
Mon = 0,
|
|
55
|
-
Mana = 1,
|
|
56
|
-
MonWithMana = 2,
|
|
57
|
-
MonWithConsumable = 3,
|
|
58
|
-
Consumable = 4,
|
|
13
|
+
export enum EventModelKind {
|
|
14
|
+
MonMove = 0,
|
|
15
|
+
ManaMove = 1,
|
|
16
|
+
ManaScored = 2,
|
|
17
|
+
MysticAction = 3,
|
|
18
|
+
DemonAction = 4,
|
|
19
|
+
DemonAdditionalStep = 5,
|
|
20
|
+
SpiritTargetMove = 6,
|
|
21
|
+
PickupBomb = 7,
|
|
22
|
+
PickupPotion = 8,
|
|
23
|
+
PickupMana = 9,
|
|
24
|
+
MonFainted = 10,
|
|
25
|
+
ManaDropped = 11,
|
|
26
|
+
SupermanaBackToBase = 12,
|
|
27
|
+
BombAttack = 13,
|
|
28
|
+
MonAwake = 14,
|
|
29
|
+
BombExplosion = 15,
|
|
30
|
+
NextTurn = 16,
|
|
31
|
+
GameOver = 17,
|
|
32
|
+
Takeback = 18,
|
|
33
|
+
UsePotion = 19,
|
|
59
34
|
}
|
|
60
35
|
/**
|
|
61
36
|
*/
|
|
@@ -76,14 +51,6 @@ export enum SquareModelKind {
|
|
|
76
51
|
}
|
|
77
52
|
/**
|
|
78
53
|
*/
|
|
79
|
-
export enum AvailableMoveKind {
|
|
80
|
-
MonMove = 0,
|
|
81
|
-
ManaMove = 1,
|
|
82
|
-
Action = 2,
|
|
83
|
-
Potion = 3,
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
*/
|
|
87
54
|
export enum NextInputKind {
|
|
88
55
|
MonMove = 0,
|
|
89
56
|
ManaMove = 1,
|
|
@@ -97,33 +64,66 @@ export enum NextInputKind {
|
|
|
97
64
|
}
|
|
98
65
|
/**
|
|
99
66
|
*/
|
|
67
|
+
export enum OutputModelKind {
|
|
68
|
+
InvalidInput = 0,
|
|
69
|
+
LocationsToStartFrom = 1,
|
|
70
|
+
NextInputOptions = 2,
|
|
71
|
+
Events = 3,
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
*/
|
|
100
75
|
export enum ManaKind {
|
|
101
76
|
Regular = 0,
|
|
102
77
|
Supermana = 1,
|
|
103
78
|
}
|
|
104
79
|
/**
|
|
105
80
|
*/
|
|
106
|
-
export enum
|
|
81
|
+
export enum AvailableMoveKind {
|
|
107
82
|
MonMove = 0,
|
|
108
83
|
ManaMove = 1,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
84
|
+
Action = 2,
|
|
85
|
+
Potion = 3,
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
*/
|
|
89
|
+
export enum MonKind {
|
|
90
|
+
Demon = 0,
|
|
91
|
+
Drainer = 1,
|
|
92
|
+
Angel = 2,
|
|
93
|
+
Spirit = 3,
|
|
94
|
+
Mystic = 4,
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
*/
|
|
98
|
+
export enum GameVariant {
|
|
99
|
+
Classic = 0,
|
|
100
|
+
SwappedManaRows = 1,
|
|
101
|
+
OffsetArcManaRows = 2,
|
|
102
|
+
CenterSpokeManaRows = 3,
|
|
103
|
+
AlternatingManaRows = 4,
|
|
104
|
+
InnerWedgeManaRows = 5,
|
|
105
|
+
OuterWedgeManaRows = 6,
|
|
106
|
+
BentCenterManaRows = 7,
|
|
107
|
+
OuterEdgeManaRows = 8,
|
|
108
|
+
SplitFlankManaRows = 9,
|
|
109
|
+
ForwardBridgeManaRows = 10,
|
|
110
|
+
CornerChainManaRows = 11,
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
*/
|
|
114
|
+
export enum ItemModelKind {
|
|
115
|
+
Mon = 0,
|
|
116
|
+
Mana = 1,
|
|
117
|
+
MonWithMana = 2,
|
|
118
|
+
MonWithConsumable = 3,
|
|
119
|
+
Consumable = 4,
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
*/
|
|
123
|
+
export enum Modifier {
|
|
124
|
+
SelectPotion = 0,
|
|
125
|
+
SelectBomb = 1,
|
|
126
|
+
Cancel = 2,
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
129
|
*/
|
|
@@ -447,141 +447,3 @@ export class VerboseTrackingEntityModel {
|
|
|
447
447
|
*/
|
|
448
448
|
events(): (EventModel)[];
|
|
449
449
|
}
|
|
450
|
-
|
|
451
|
-
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
452
|
-
|
|
453
|
-
export interface InitOutput {
|
|
454
|
-
readonly memory: WebAssembly.Memory;
|
|
455
|
-
readonly __wbg_eventmodel_free: (a: number) => void;
|
|
456
|
-
readonly __wbg_get_eventmodel_color: (a: number) => number;
|
|
457
|
-
readonly __wbg_get_eventmodel_item: (a: number) => number;
|
|
458
|
-
readonly __wbg_get_eventmodel_kind: (a: number) => number;
|
|
459
|
-
readonly __wbg_get_eventmodel_loc1: (a: number) => number;
|
|
460
|
-
readonly __wbg_get_eventmodel_loc2: (a: number) => number;
|
|
461
|
-
readonly __wbg_get_eventmodel_mana: (a: number) => number;
|
|
462
|
-
readonly __wbg_get_eventmodel_mon: (a: number) => number;
|
|
463
|
-
readonly __wbg_get_itemmodel_consumable: (a: number) => number;
|
|
464
|
-
readonly __wbg_get_itemmodel_kind: (a: number) => number;
|
|
465
|
-
readonly __wbg_get_itemmodel_mana: (a: number) => number;
|
|
466
|
-
readonly __wbg_get_itemmodel_mon: (a: number) => number;
|
|
467
|
-
readonly __wbg_get_location_i: (a: number) => number;
|
|
468
|
-
readonly __wbg_get_location_j: (a: number) => number;
|
|
469
|
-
readonly __wbg_get_manamodel_color: (a: number) => number;
|
|
470
|
-
readonly __wbg_get_manamodel_kind: (a: number) => number;
|
|
471
|
-
readonly __wbg_get_mon_color: (a: number) => number;
|
|
472
|
-
readonly __wbg_get_mon_kind: (a: number) => number;
|
|
473
|
-
readonly __wbg_get_nextinputmodel_actor_mon_item: (a: number) => number;
|
|
474
|
-
readonly __wbg_get_nextinputmodel_kind: (a: number) => number;
|
|
475
|
-
readonly __wbg_get_nextinputmodel_modifier: (a: number) => number;
|
|
476
|
-
readonly __wbg_get_outputmodel_kind: (a: number) => number;
|
|
477
|
-
readonly __wbg_get_squaremodel_color: (a: number) => number;
|
|
478
|
-
readonly __wbg_get_squaremodel_kind: (a: number) => number;
|
|
479
|
-
readonly __wbg_get_squaremodel_mon_kind: (a: number) => number;
|
|
480
|
-
readonly __wbg_itemmodel_free: (a: number) => void;
|
|
481
|
-
readonly __wbg_location_free: (a: number) => void;
|
|
482
|
-
readonly __wbg_manamodel_free: (a: number) => void;
|
|
483
|
-
readonly __wbg_mon_free: (a: number) => void;
|
|
484
|
-
readonly __wbg_monsgamemodel_free: (a: number) => void;
|
|
485
|
-
readonly __wbg_nextinputmodel_free: (a: number) => void;
|
|
486
|
-
readonly __wbg_outputmodel_free: (a: number) => void;
|
|
487
|
-
readonly __wbg_set_eventmodel_color: (a: number, b: number) => void;
|
|
488
|
-
readonly __wbg_set_eventmodel_item: (a: number, b: number) => void;
|
|
489
|
-
readonly __wbg_set_eventmodel_kind: (a: number, b: number) => void;
|
|
490
|
-
readonly __wbg_set_eventmodel_loc1: (a: number, b: number) => void;
|
|
491
|
-
readonly __wbg_set_eventmodel_loc2: (a: number, b: number) => void;
|
|
492
|
-
readonly __wbg_set_eventmodel_mana: (a: number, b: number) => void;
|
|
493
|
-
readonly __wbg_set_eventmodel_mon: (a: number, b: number) => void;
|
|
494
|
-
readonly __wbg_set_itemmodel_consumable: (a: number, b: number) => void;
|
|
495
|
-
readonly __wbg_set_itemmodel_kind: (a: number, b: number) => void;
|
|
496
|
-
readonly __wbg_set_itemmodel_mana: (a: number, b: number) => void;
|
|
497
|
-
readonly __wbg_set_itemmodel_mon: (a: number, b: number) => void;
|
|
498
|
-
readonly __wbg_set_location_i: (a: number, b: number) => void;
|
|
499
|
-
readonly __wbg_set_location_j: (a: number, b: number) => void;
|
|
500
|
-
readonly __wbg_set_manamodel_color: (a: number, b: number) => void;
|
|
501
|
-
readonly __wbg_set_manamodel_kind: (a: number, b: number) => void;
|
|
502
|
-
readonly __wbg_set_mon_color: (a: number, b: number) => void;
|
|
503
|
-
readonly __wbg_set_mon_kind: (a: number, b: number) => void;
|
|
504
|
-
readonly __wbg_set_nextinputmodel_actor_mon_item: (a: number, b: number) => void;
|
|
505
|
-
readonly __wbg_set_nextinputmodel_kind: (a: number, b: number) => void;
|
|
506
|
-
readonly __wbg_set_nextinputmodel_modifier: (a: number, b: number) => void;
|
|
507
|
-
readonly __wbg_set_outputmodel_kind: (a: number, b: number) => void;
|
|
508
|
-
readonly __wbg_set_squaremodel_color: (a: number, b: number) => void;
|
|
509
|
-
readonly __wbg_set_squaremodel_kind: (a: number, b: number) => void;
|
|
510
|
-
readonly __wbg_set_squaremodel_mon_kind: (a: number, b: number) => void;
|
|
511
|
-
readonly __wbg_squaremodel_free: (a: number) => void;
|
|
512
|
-
readonly __wbg_verbosetrackingentitymodel_free: (a: number) => void;
|
|
513
|
-
readonly location_new: (a: number, b: number) => number;
|
|
514
|
-
readonly mon_decrease_cooldown: (a: number) => void;
|
|
515
|
-
readonly mon_faint: (a: number) => void;
|
|
516
|
-
readonly mon_is_fainted: (a: number) => number;
|
|
517
|
-
readonly mon_new: (a: number, b: number, c: number) => number;
|
|
518
|
-
readonly monsgamemodel_active_color: (a: number) => number;
|
|
519
|
-
readonly monsgamemodel_automove: (a: number) => number;
|
|
520
|
-
readonly monsgamemodel_available_move_kinds: (a: number, b: number) => void;
|
|
521
|
-
readonly monsgamemodel_black_score: (a: number) => number;
|
|
522
|
-
readonly monsgamemodel_can_takeback: (a: number, b: number) => number;
|
|
523
|
-
readonly monsgamemodel_clearTracking: (a: number) => void;
|
|
524
|
-
readonly monsgamemodel_fen: (a: number, b: number) => void;
|
|
525
|
-
readonly monsgamemodel_fromFenForSimulation: (a: number, b: number) => number;
|
|
526
|
-
readonly monsgamemodel_from_fen: (a: number, b: number) => number;
|
|
527
|
-
readonly monsgamemodel_inactive_player_items_counters: (a: number, b: number) => void;
|
|
528
|
-
readonly monsgamemodel_is_later_than: (a: number, b: number, c: number) => number;
|
|
529
|
-
readonly monsgamemodel_is_moves_verified: (a: number) => number;
|
|
530
|
-
readonly monsgamemodel_item: (a: number, b: number) => number;
|
|
531
|
-
readonly monsgamemodel_locations_with_content: (a: number, b: number) => void;
|
|
532
|
-
readonly monsgamemodel_new: (a: number) => number;
|
|
533
|
-
readonly monsgamemodel_newForSimulation: (a: number) => number;
|
|
534
|
-
readonly monsgamemodel_process_input: (a: number, b: number, c: number, d: number) => number;
|
|
535
|
-
readonly monsgamemodel_process_input_fen: (a: number, b: number, c: number) => number;
|
|
536
|
-
readonly monsgamemodel_remove_item: (a: number, b: number) => void;
|
|
537
|
-
readonly monsgamemodel_setVerboseTracking: (a: number, b: number) => void;
|
|
538
|
-
readonly monsgamemodel_smartAutomove: (a: number, b: number, c: number, d: number) => void;
|
|
539
|
-
readonly monsgamemodel_square: (a: number, b: number) => number;
|
|
540
|
-
readonly monsgamemodel_takeback: (a: number) => number;
|
|
541
|
-
readonly monsgamemodel_takeback_fens: (a: number, b: number) => void;
|
|
542
|
-
readonly monsgamemodel_turn_number: (a: number) => number;
|
|
543
|
-
readonly monsgamemodel_verbose_tracking_entities: (a: number, b: number) => void;
|
|
544
|
-
readonly monsgamemodel_verify_moves: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
545
|
-
readonly monsgamemodel_white_score: (a: number) => number;
|
|
546
|
-
readonly monsgamemodel_winner_color: (a: number) => number;
|
|
547
|
-
readonly monsgamemodel_without_last_turn: (a: number, b: number, c: number) => number;
|
|
548
|
-
readonly outputmodel_events: (a: number, b: number) => void;
|
|
549
|
-
readonly outputmodel_input_fen: (a: number, b: number) => void;
|
|
550
|
-
readonly outputmodel_locations: (a: number, b: number) => void;
|
|
551
|
-
readonly outputmodel_next_inputs: (a: number, b: number) => void;
|
|
552
|
-
readonly verbosetrackingentitymodel_color: (a: number) => number;
|
|
553
|
-
readonly verbosetrackingentitymodel_events: (a: number, b: number) => void;
|
|
554
|
-
readonly verbosetrackingentitymodel_events_fen: (a: number, b: number) => void;
|
|
555
|
-
readonly verbosetrackingentitymodel_fen: (a: number, b: number) => void;
|
|
556
|
-
readonly winner: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
557
|
-
readonly __wbg_set_nextinputmodel_location: (a: number, b: number) => void;
|
|
558
|
-
readonly __wbg_set_mon_cooldown: (a: number, b: number) => void;
|
|
559
|
-
readonly __wbg_get_mon_cooldown: (a: number) => number;
|
|
560
|
-
readonly __wbg_get_nextinputmodel_location: (a: number) => number;
|
|
561
|
-
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
562
|
-
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
563
|
-
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
564
|
-
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
565
|
-
readonly __wbindgen_exn_store: (a: number) => void;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
569
|
-
/**
|
|
570
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
571
|
-
* a precompiled `WebAssembly.Module`.
|
|
572
|
-
*
|
|
573
|
-
* @param {SyncInitInput} module
|
|
574
|
-
*
|
|
575
|
-
* @returns {InitOutput}
|
|
576
|
-
*/
|
|
577
|
-
export function initSync(module: SyncInitInput): InitOutput;
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
581
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
582
|
-
*
|
|
583
|
-
* @param {InitInput | Promise<InitInput>} module_or_path
|
|
584
|
-
*
|
|
585
|
-
* @returns {Promise<InitOutput>}
|
|
586
|
-
*/
|
|
587
|
-
export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
|