Skip to content

Commit 04a6a1c

Browse files
committed
wasm: Make sure the param to use() is of the appropriate subtype
1 parent 834d87e commit 04a6a1c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/wasm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ohm-js/wasm",
3-
"version": "0.6.16",
3+
"version": "0.6.17",
44
"description": "Compile Ohm.js grammars to WebAsssembly",
55
"main": "dist/index.js",
66
"exports": {

packages/wasm/src/miniohm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ export class MatchResult {
757757
: '[match succeeded]';
758758
}
759759

760-
use<T>(cb: (r: MatchResult) => T): T {
760+
use<T>(cb: (r: this) => T): T {
761761
try {
762762
this.grammar._beginUse(this);
763763
return cb(this);

0 commit comments

Comments
 (0)