autocomplete: replace Fuse.js with liblevenshtein

This commit is contained in:
Aviral Dasgupta 2016-12-01 12:06:57 +05:30
parent edd5903ed7
commit 78641a80dd
No known key found for this signature in database
GPG key ID: 5FD1E9F4FFD3DA80
7 changed files with 92 additions and 20 deletions

View file

@ -2,7 +2,7 @@ import React from 'react';
import type {Completion, SelectionRange} from './Autocompleter';
export default class AutocompleteProvider {
constructor(commandRegex?: RegExp, fuseOpts?: any) {
constructor(commandRegex?: RegExp) {
if (commandRegex) {
if (!commandRegex.global) {
throw new Error('commandRegex must have global flag set');