Closed
Description
TypeScript Version: 1.8.0
Code
There are 4 Date constructors in ECMAScript 5.1
- without anguments: new Date()
- with a single integer argument: new Date(200)
- with a single string argument: new Date("2016-08-10T22:46:48.160Z")
- with 7 integer arguments: new Date(2016, 8, 10, 21, 0, 0, 0);
But in ECMAScript 2015 there is another one:
- with a single Date argument: new Date(new Date())
Link to ECMAScript2015
But this constructor isn't added in lib.es2015.core.d.ts.
Expected behavior:
It should be valid code:
var a = new Date();
var b = new Date(a);
Actual behavior:
There is an error, that a isn't a string or number.