Skip to content

Commit

Permalink
fix: address further issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k committed Sep 16, 2020
1 parent 23d30a7 commit e368eff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/dts/lib.deno.shared_globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1552,4 +1552,4 @@ declare function confirm(message?: string): boolean;
* @param message
* @param defaultValue
*/
declare function prompt(message?: string, defaultValue?: string): string;
declare function prompt(message?: string, defaultValue?: string): string | null;
2 changes: 1 addition & 1 deletion cli/dts/lib.deno.window.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare interface Window extends EventTarget {
readonly closed: boolean;
alert: (message?: string) => void;
confirm: (message?: string) => boolean;
prompt: (message?: string, defaultValue?: string) => string;
prompt: (message?: string, defaultValue?: string) => string | null;
Deno: typeof Deno;
}

Expand Down
2 changes: 1 addition & 1 deletion cli/rt/41_prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
defaultValue ??= null;

if (!isatty(stdin.rid)) {
return defaultValue;
return null;
}

stdout.writeSync(encoder.encode(`${message} `));
Expand Down

0 comments on commit e368eff

Please sign in to comment.