mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 05:20:25 +00:00
Fix tslint issues in v0/lunr-tests.ts
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* Basic test, from http://lunrjs.com/
|
||||
*/
|
||||
function basic_test() {
|
||||
var index = lunr(function () {
|
||||
const index = lunr(function() {
|
||||
this.field('title', {boost: 10});
|
||||
this.field('body');
|
||||
this.ref('id');
|
||||
@@ -25,20 +23,19 @@ function basic_test() {
|
||||
index.search('foo');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Pipeline test, from http://lunrjs.com/
|
||||
*/
|
||||
function pipeline_test() {
|
||||
var index = lunr(function () {
|
||||
this.pipeline.add(function (token:string, tokenIndex:number, tokens:string[]):string {
|
||||
const index = lunr(function() {
|
||||
this.pipeline.add(function(token: string, tokenIndex: number, tokens: string[]): string {
|
||||
// text processing in here
|
||||
return token;
|
||||
});
|
||||
|
||||
this.pipeline.after(lunr.stopWordFilter, function (token:string, tokenIndex:number, tokens:string[]):string {
|
||||
this.pipeline.after(lunr.stopWordFilter, function(token: string, tokenIndex: number, tokens: string[]): string {
|
||||
// text processing in here
|
||||
return token;
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user