Skip to content

Commit 6241dc7

Browse files
committed
Revert change to alert signature
1 parent 8be8195 commit 6241dc7

7 files changed

Lines changed: 42 additions & 45 deletions

src/lib/dom.generated.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28394,7 +28394,7 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler
2839428394
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/window) */
2839528395
readonly window: Window & typeof globalThis;
2839628396
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/alert) */
28397-
alert(message?: string): void;
28397+
alert(message?: any): void;
2839828398
/**
2839928399
* @deprecated
2840028400
*
@@ -30047,7 +30047,7 @@ declare var visualViewport: VisualViewport | null;
3004730047
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/window) */
3004830048
declare var window: Window & typeof globalThis;
3004930049
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/alert) */
30050-
declare function alert(message?: string): void;
30050+
declare function alert(message?: any): void;
3005130051
/**
3005230052
* @deprecated
3005330053
*

tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
=== collisionThisExpressionAndLocalVarInLambda.ts ===
44
declare function alert(message?: any): void;
5-
>alert : { (message?: string): void; (message?: any): void; }
6-
> : ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
5+
>alert : { (message?: any): void; (message?: any): void; }
6+
> : ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
77
>message : any
88

99
var x = {
@@ -37,8 +37,8 @@ var x = {
3737
alert(x.doStuff(x => alert(x)));
3838
>alert(x.doStuff(x => alert(x))) : void
3939
> : ^^^^
40-
>alert : { (message?: string): void; (message?: any): void; }
41-
> : ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
40+
>alert : { (message?: any): void; (message?: any): void; }
41+
> : ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
4242
>x.doStuff(x => alert(x)) : () => any
4343
> : ^^^^^^^^^
4444
>x.doStuff : (callback: any) => () => any
@@ -52,7 +52,7 @@ alert(x.doStuff(x => alert(x)));
5252
>x : any
5353
>alert(x) : void
5454
> : ^^^^
55-
>alert : { (message?: string): void; (message?: any): void; }
56-
> : ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
55+
>alert : { (message?: any): void; (message?: any): void; }
56+
> : ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
5757
>x : any
5858

tests/baselines/reference/instantiateContextualTypes.errors.txt.delete

Whitespace-only changes.

tests/baselines/reference/instantiateContextualTypes.types

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ fn(handlers, value => alert(value));
3737
> : ^^^^^^
3838
>alert(value) : void
3939
> : ^^^^
40-
>alert : (message?: string) => void
41-
> : ^ ^^^ ^^^^^
40+
>alert : (message?: any) => void
41+
> : ^ ^^^ ^^^^^
4242
>value : number
4343
> : ^^^^^^
4444

@@ -209,7 +209,6 @@ const NON_VOID_ACTION: ActionType<number> = 'NON_VOID_ACTION'
209209

210210
createReducer(
211211
>createReducer( defaultState, handler(NON_VOID_ACTION, (state, _payload) => state), handler(VOID_ACTION, state => state)) : any
212-
> : ^^^
213212
>createReducer : <S>(defaultState: S, ...actionHandlers: ActionHandler<S, any>[]) => any
214213
> : ^ ^^ ^^ ^^^^^ ^^ ^^^^^
215214

@@ -377,7 +376,6 @@ class InferFunctionTypes extends Component<{children: (foo: number) => string}>
377376

378377
createElement(InferFunctionTypes, (foo) => "" + foo);
379378
>createElement(InferFunctionTypes, (foo) => "" + foo) : any
380-
> : ^^^
381379
>createElement : <P extends {}>(type: ComponentClass<P>, ...children: P extends { children?: infer C; } ? C extends any[] ? C : C[] : unknown) => any
382380
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
383381
>InferFunctionTypes : typeof InferFunctionTypes
@@ -395,7 +393,6 @@ createElement(InferFunctionTypes, (foo) => "" + foo);
395393

396394
createElement2(InferFunctionTypes, [(foo) => "" + foo]);
397395
>createElement2(InferFunctionTypes, [(foo) => "" + foo]) : any
398-
> : ^^^
399396
>createElement2 : <P extends {}>(type: ComponentClass<P>, child: P extends { children?: infer C; } ? C extends any[] ? C : C[] : unknown) => any
400397
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
401398
>InferFunctionTypes : typeof InferFunctionTypes

tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
=== noCollisionThisExpressionAndLocalVarInLambda.ts ===
44
declare function alert(message?: any): void;
5-
>alert : { (message?: string): void; (message?: any): void; }
6-
> : ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
5+
>alert : { (message?: any): void; (message?: any): void; }
6+
> : ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
77
>message : any
88

99
var x = {
@@ -37,8 +37,8 @@ var x = {
3737
alert(x.doStuff(x => alert(x)));
3838
>alert(x.doStuff(x => alert(x))) : void
3939
> : ^^^^
40-
>alert : { (message?: string): void; (message?: any): void; }
41-
> : ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
40+
>alert : { (message?: any): void; (message?: any): void; }
41+
> : ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
4242
>x.doStuff(x => alert(x)) : () => any
4343
> : ^^^^^^^^^
4444
>x.doStuff : (callback: any) => () => any
@@ -52,7 +52,7 @@ alert(x.doStuff(x => alert(x)));
5252
>x : any
5353
>alert(x) : void
5454
> : ^^^^
55-
>alert : { (message?: string): void; (message?: any): void; }
56-
> : ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
55+
>alert : { (message?: any): void; (message?: any): void; }
56+
> : ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
5757
>x : any
5858

tests/baselines/reference/underscoreTest1.types

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ declare var $;
1111
> : ^^^
1212

1313
declare function alert(x: string): void;
14-
>alert : { (message?: string): void; (x: string): void; }
15-
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
14+
>alert : { (message?: any): void; (x: string): void; }
15+
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
1616
>x : string
1717
> : ^^^^^^
1818

@@ -39,8 +39,8 @@ _.each([1, 2, 3], (num) => alert(num.toString()));
3939
> : ^^^^^^
4040
>alert(num.toString()) : void
4141
> : ^^^^
42-
>alert : { (message?: string): void; (x: string): void; }
43-
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
42+
>alert : { (message?: any): void; (x: string): void; }
43+
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
4444
>num.toString() : string
4545
> : ^^^^^^
4646
>num.toString : (radix?: number) => string
@@ -81,8 +81,8 @@ _.each({ one: 1, two: 2, three: 3 }, (value: number, key?: string) => alert(valu
8181
> : ^^^^^^
8282
>alert(value.toString()) : void
8383
> : ^^^^
84-
>alert : { (message?: string): void; (x: string): void; }
85-
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
84+
>alert : { (message?: any): void; (x: string): void; }
85+
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
8686
>value.toString() : string
8787
> : ^^^^^^
8888
>value.toString : (radix?: number) => string
@@ -1516,8 +1516,8 @@ var buttonView = {
15161516
> : ^^^^^^^^^^
15171517
>alert('clicked: ' + this.label) : void
15181518
> : ^^^^
1519-
>alert : { (message?: string): void; (x: string): void; }
1520-
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
1519+
>alert : { (message?: any): void; (x: string): void; }
1520+
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
15211521
>'clicked: ' + this.label : string
15221522
> : ^^^^^^
15231523
>'clicked: ' : "clicked: "
@@ -1536,8 +1536,8 @@ var buttonView = {
15361536
> : ^^^^^^^^^^
15371537
>alert('hovering: ' + this.label) : void
15381538
> : ^^^^
1539-
>alert : { (message?: string): void; (x: string): void; }
1540-
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
1539+
>alert : { (message?: any): void; (x: string): void; }
1540+
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
15411541
>'hovering: ' + this.label : string
15421542
> : ^^^^^^
15431543
>'hovering: ' : "hovering: "
@@ -1685,8 +1685,8 @@ _.defer(function () { alert('deferred'); });
16851685
> : ^^^^^^^^^^
16861686
>alert('deferred') : void
16871687
> : ^^^^
1688-
>alert : { (message?: string): void; (x: string): void; }
1689-
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
1688+
>alert : { (message?: any): void; (x: string): void; }
1689+
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
16901690
>'deferred' : "deferred"
16911691
> : ^^^^^^^^^^
16921692

@@ -1697,8 +1697,8 @@ var updatePosition = () => alert('updating position...');
16971697
> : ^^^^^^^^^^
16981698
>alert('updating position...') : void
16991699
> : ^^^^
1700-
>alert : { (message?: string): void; (x: string): void; }
1701-
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
1700+
>alert : { (message?: any): void; (x: string): void; }
1701+
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
17021702
>'updating position...' : "updating position..."
17031703
> : ^^^^^^^^^^^^^^^^^^^^^^
17041704

@@ -1739,8 +1739,8 @@ var calculateLayout = () => alert('calculating layout...');
17391739
> : ^^^^^^^^^^
17401740
>alert('calculating layout...') : void
17411741
> : ^^^^
1742-
>alert : { (message?: string): void; (x: string): void; }
1743-
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
1742+
>alert : { (message?: any): void; (x: string): void; }
1743+
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
17441744
>'calculating layout...' : "calculating layout..."
17451745
> : ^^^^^^^^^^^^^^^^^^^^^^^
17461746

@@ -1781,8 +1781,8 @@ var createApplication = () => alert('creating application...');
17811781
> : ^^^^^^^^^^
17821782
>alert('creating application...') : void
17831783
> : ^^^^
1784-
>alert : { (message?: string): void; (x: string): void; }
1785-
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
1784+
>alert : { (message?: any): void; (x: string): void; }
1785+
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
17861786
>'creating application...' : "creating application..."
17871787
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
17881788

@@ -1823,8 +1823,8 @@ var render = () => alert("rendering...");
18231823
> : ^^^^^^^^^^
18241824
>alert("rendering...") : void
18251825
> : ^^^^
1826-
>alert : { (message?: string): void; (x: string): void; }
1827-
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
1826+
>alert : { (message?: any): void; (x: string): void; }
1827+
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
18281828
>"rendering..." : "rendering..."
18291829
> : ^^^^^^^^^^^^^^
18301830

@@ -2281,8 +2281,8 @@ _.chain([1, 2, 3, 200])
22812281
> : ^ ^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22822282
><any>alert : any
22832283
> : ^^^
2284-
>alert : { (message?: string): void; (x: string): void; }
2285-
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
2284+
>alert : { (message?: any): void; (x: string): void; }
2285+
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
22862286

22872287
.map(function (num) { return num * num })
22882288
>map : <U>(iterator: Iterator_<number, U>, context?: any) => Underscore.ChainedArray<U>
@@ -2529,8 +2529,8 @@ _.isFunction(alert);
25292529
> : ^^^^^^^^^^^^^^^^^
25302530
>isFunction : (object: any) => boolean
25312531
> : ^ ^^ ^^^^^
2532-
>alert : { (message?: string): void; (x: string): void; }
2533-
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
2532+
>alert : { (message?: any): void; (x: string): void; }
2533+
> : ^^^ ^^^ ^^^ ^^^ ^^ ^^^ ^^^
25342534

25352535
_.isString("moe");
25362536
>_.isString("moe") : boolean

tests/baselines/reference/unicodeIdentifierName2.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ var a₁ = "hello"; alert(a₁)
88
> : ^^^^^^^
99
>alert(a₁) : void
1010
> : ^^^^
11-
>alert : (message?: string) => void
12-
> : ^ ^^^ ^^^^^
11+
>alert : (message?: any) => void
12+
> : ^ ^^^ ^^^^^
1313
>a : any
1414
> : ^^^
1515

0 commit comments

Comments
 (0)