Commit 7b9ceb8
refactor: use union type in
* refactor: use union type in `DateConstructor`
Add support for union types in `DateConstructor`
This will add support for something like the below;
`
let date; string | number;
const date = new Date(x);
`
Closes: microsoft#21758
* fix: date constructor can't be passed `string | Date`, but takes either individually
Closes: microsoft#20900DateConstructor (microsoft#21757)1 parent 5915b6d commit 7b9ceb8
2 files changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
795 | | - | |
796 | | - | |
| 795 | + | |
797 | 796 | | |
798 | 797 | | |
799 | 798 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
0 commit comments