Open TheJonRobinson opened 4 years ago
For me tsd works great except for what seems like an inconsistency dealing with Number[]?
Simple test file:
/** * @type {Number|Number[]} */ var numberArray = [];
Output:
/** * @type {Number|Number[]} */ declare var numberArray: number | Number[];
Number becomes a plain number but Number[] remains Number[]. This results in Typescript (correctly) grumbling:
Number
number
Number[]
'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible.
I'm using tsd on a 3rd party project (i.e. not trivial to alter the source), and this does seem inconsistent behaviour.
Looks like a bug, thanks for bringing it up!
For me tsd works great except for what seems like an inconsistency dealing with Number[]?
Simple test file:
Output:
Number
becomes a plainnumber
butNumber[]
remainsNumber[]
. This results in Typescript (correctly) grumbling:I'm using tsd on a 3rd party project (i.e. not trivial to alter the source), and this does seem inconsistent behaviour.