TypeScript-DOM-lib-generator
TypeScript-DOM-lib-generator copied to clipboard
Inconsistent signatures for alert() vs prompt()/confirm()
Currently, we have:
declare function alert(message?: any): void;
declare function prompt(message?: string, _default?: string): string | null;
declare function confirm(message?: string): boolean;
Presumably alert is typed as taking any because it accepts input of any type and implicitly casts it to a string. However, testing in Chrome, Safari, and Firefox, prompt and confirm both do the same thing.
I guess it can be string too, yeah. PRs welcome.