Skip to content

Commit c4d19f3

Browse files
authored
Merge pull request #96 from vim-denops/fix-input-type
🐛 Fix type definitions of `completion` argument
2 parents a33f09f + b50ba5c commit c4d19f3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

denops_std/function/input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function input(
4848
denops: Denops,
4949
prompt: string,
5050
text = "",
51-
completion?: BuiltinCompletion | string,
51+
completion?: BuiltinCompletion | (string & { _?: never }),
5252
): Promise<string> {
5353
if (completion && !isValidBuiltinCompletion(completion)) {
5454
if (

denops_std/helper/input.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ export type CustomCompletion = (
1212
export type InputOptions = {
1313
prompt?: string;
1414
text?: string;
15-
completion?: fn.BuiltinCompletion | string | CustomCompletion;
15+
completion?:
16+
| fn.BuiltinCompletion
17+
| (string & { _?: never })
18+
| CustomCompletion;
1619
// Guard `input` by `inputsave` and `inputrestore`
1720
inputsave?: boolean;
1821
};

0 commit comments

Comments
 (0)