mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
21 lines
651 B
TypeScript
21 lines
651 B
TypeScript
import { match, filter, score } from 'fuzzaldrin';
|
|
|
|
let number = 0;
|
|
const string = '' as string;
|
|
let strings: string[] = [];
|
|
let objects: Array<{name: string, speed: number}> = [];
|
|
|
|
strings = filter(strings, string);
|
|
strings = filter(strings, string, {maxResults: number});
|
|
objects = filter(objects, string, {key: 'name'});
|
|
objects = filter(objects, string, {key: 'name', maxResults: number});
|
|
|
|
number = score(string, string);
|
|
|
|
match(string, string);
|
|
|
|
// These should be type errors! Uncomment to verify.
|
|
// objects = filter(objects, string);
|
|
// objects = filter(objects, string, {key: 'speed'});
|
|
// strings = filter(strings, string, {key: 'speed'});
|