AsyncCompleter for readline

Previous Completer interface required implementation
of BOTH types (sync and async). Sync type could
be assigned to async type, but not vice versa, forcing
implementers to always implement the sync interface.
This commit is contained in:
Joshua Ball
2017-03-11 19:14:29 -08:00
committed by Joshua Ball
parent 86526d0819
commit 98c9f30fc3
2 changed files with 10 additions and 6 deletions
+6
View File
@@ -1265,6 +1265,12 @@ namespace readline_tests {
return [['test'], 'test'];
}
});
result = readline.createInterface({
input: input,
completer: function(str: string, callback: (err: any, result: readline.CompleterResult) => void): any {
callback(null, [['test'], 'test']);
}
});
}
{