File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { assert } from "@std/assert/assert" ;
2
- import { memoize } from "@std/cache/memoize" ;
2
+ import { MemoizationCacheResult , memoize } from "@std/cache/memoize" ;
3
3
import { ArrayResult , ArrayResultError } from "../array_result.ts" ;
4
4
import { Clearable , ClearableCacheSet , Lazy } from "../cache.ts" ;
5
5
import { throwError } from "../misc.ts" ;
@@ -14,7 +14,7 @@ export class Parser<T> {
14
14
constructor ( parser : ( src : string ) => ParserResult < T > ) {
15
15
this . unmemoizedParser = parser ;
16
16
if ( Parser . cache != null ) {
17
- const cache = new Map ( ) ;
17
+ const cache = new Map < string , MemoizationCacheResult < ParserResult < T > > > ( ) ;
18
18
Parser . addToCache ( cache ) ;
19
19
this . rawParser = memoize ( this . unmemoizedParser , { cache } ) ;
20
20
} else {
You can’t perform that action at this time.
0 commit comments