Commit ad748e0
committed
strictNullChecks/strictPropertyInitialization WIP
This PR focuses on unblocking `strictNullChecks` and
`strictPropertyInitialization` in ecmascript.ts and calendar.ts.
It's intended as a complement to @jens-ox's work to remove
`GetIntrinsic`.
This PR:
* Enables strictNullChecks: true and strictPropertyInitialization: true
in tsconfig.json.
* Improves calendar.ts TS types (this was most of the work in this PR)
* Removes all unnecessary use of `any` throughout the polyfill
* Updates types of ecmascript.ts and fixes a number of type bugs
* Refactors a few types in intl.ts
* A handful of trivial type changes in other files (ecmascript.ts and
calendar-ts were 95%+ of the work).
I'm working on splitting out any runtime changes into separate PRs.
Once those are split out, this PR should be ready to review.1 parent 6119bbc commit ad748e0
File tree
9 files changed
+702
-494
lines changed- lib
9 files changed
+702
-494
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
606 | | - | |
607 | | - | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
608 | 609 | | |
609 | 610 | | |
610 | 611 | | |
| |||
648 | 649 | | |
649 | 650 | | |
650 | 651 | | |
651 | | - | |
| 652 | + | |
652 | 653 | | |
653 | 654 | | |
654 | 655 | | |
655 | | - | |
| 656 | + | |
656 | 657 | | |
657 | 658 | | |
658 | 659 | | |
659 | | - | |
| 660 | + | |
660 | 661 | | |
661 | 662 | | |
662 | 663 | | |
| |||
726 | 727 | | |
727 | 728 | | |
728 | 729 | | |
729 | | - | |
| 730 | + | |
730 | 731 | | |
731 | 732 | | |
732 | 733 | | |
733 | | - | |
| 734 | + | |
734 | 735 | | |
735 | 736 | | |
736 | 737 | | |
737 | | - | |
| 738 | + | |
738 | 739 | | |
739 | 740 | | |
740 | 741 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 19 | + | |
29 | 20 | | |
30 | 21 | | |
31 | 22 | | |
| |||
340 | 331 | | |
341 | 332 | | |
342 | 333 | | |
343 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
344 | 337 | | |
345 | 338 | | |
346 | 339 | | |
| |||
359 | 352 | | |
360 | 353 | | |
361 | 354 | | |
362 | | - | |
| 355 | + | |
363 | 356 | | |
364 | 357 | | |
365 | 358 | | |
| |||
377 | 370 | | |
378 | 371 | | |
379 | 372 | | |
380 | | - | |
| 373 | + | |
381 | 374 | | |
382 | 375 | | |
383 | 376 | | |
| |||
395 | 388 | | |
396 | 389 | | |
397 | 390 | | |
398 | | - | |
| 391 | + | |
399 | 392 | | |
400 | 393 | | |
401 | 394 | | |
| |||
414 | 407 | | |
415 | 408 | | |
416 | 409 | | |
417 | | - | |
| 410 | + | |
418 | 411 | | |
419 | 412 | | |
420 | 413 | | |
| |||
429 | 422 | | |
430 | 423 | | |
431 | 424 | | |
432 | | - | |
| 425 | + | |
433 | 426 | | |
434 | 427 | | |
435 | 428 | | |
| |||
445 | 438 | | |
446 | 439 | | |
447 | 440 | | |
448 | | - | |
| 441 | + | |
449 | 442 | | |
450 | 443 | | |
451 | 444 | | |
| |||
460 | 453 | | |
461 | 454 | | |
462 | 455 | | |
463 | | - | |
| 456 | + | |
464 | 457 | | |
465 | 458 | | |
466 | 459 | | |
467 | | - | |
| 460 | + | |
468 | 461 | | |
469 | 462 | | |
470 | 463 | | |
| |||
509 | 502 | | |
510 | 503 | | |
511 | 504 | | |
512 | | - | |
| 505 | + | |
| 506 | + | |
513 | 507 | | |
514 | 508 | | |
515 | 509 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments