mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
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:
@@ -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']);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user