File tree 3 files changed +9
-4
lines changed
3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ module.exports = function (config) {
61
61
test : / \. t s $ /
62
62
}
63
63
]
64
+ } ,
65
+ externals : {
66
+ fs : "fs"
64
67
}
65
68
} ,
66
69
webpackMiddleware : {
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export class InvertedIndex {
32
32
public docCount : number = 0 ;
33
33
public docStore : Map < InvertedIndex . DocumentIndex , InvertedIndex . DocStore > = new Map ( ) ;
34
34
public totalFieldLength : number = 0 ;
35
- public root : InvertedIndex . Index = new Map ( ) ;
35
+ public root : InvertedIndex . Index = new Map ( ) as InvertedIndex . Index ;
36
36
37
37
private _store : boolean ;
38
38
private _optimizeChanges : boolean ;
@@ -286,7 +286,7 @@ export class InvertedIndex {
286
286
}
287
287
288
288
private static _deserializeIndex ( serialized : Serialization . FullTextSearch . Index ) : InvertedIndex . Index {
289
- const idx : InvertedIndex . Index = new Map ( ) ;
289
+ const idx : InvertedIndex . Index = new Map ( ) as InvertedIndex . Index ;
290
290
291
291
if ( serialized . k !== undefined ) {
292
292
for ( let i = 0 ; i < serialized . k . length ; i ++ ) {
Original file line number Diff line number Diff line change @@ -222,12 +222,14 @@ export namespace V2_0 {
222
222
}
223
223
224
224
export namespace FullTextSearch {
225
+ export type DocumentIndex = number | string ;
226
+
225
227
export type InvertedIndex = SpareSerialized | FullSerialized ;
226
228
227
229
export interface Index {
228
230
d ?: {
229
231
df : number ;
230
- dc : [ number , number ] [ ]
232
+ dc : [ DocumentIndex , number ] [ ]
231
233
} ;
232
234
k ?: number [ ] ;
233
235
v ?: Index [ ] ;
@@ -242,7 +244,7 @@ export namespace V2_0 {
242
244
store : true ;
243
245
optimizeChanges : boolean ;
244
246
docCount : number ;
245
- docStore : [ number , DocStore ] [ ] ;
247
+ docStore : [ DocumentIndex , DocStore ] [ ] ;
246
248
totalFieldLength : number ;
247
249
root : Index ;
248
250
} ;
You can’t perform that action at this time.
0 commit comments