In tsc the location of top left character is 1:1. The same with eslint or VS Code.
Currently tsd is correcting the line number with + 1, but the column value is left as is. Hence, the location of top left character is reported as 1:0.
It would be more consistent and precise to + 1 the column as well and to report the top left character as 1:1. (Or to remove + 1 from the line. Somehow 1:1 sounds like better idea.)
It seems that
typescript
’s programatic API is reporting the location of top left character as 0:0.See here: https://github.com/microsoft/TypeScript/blob/e1a2c2c5a96760f841e461195ec7ccc59621431a/src/compiler/types.ts#L6225
And here: https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler
In
tsc
the location of top left character is 1:1. The same witheslint
or VS Code.Currently
tsd
is correcting the line number with+ 1
, but the column value is left as is. Hence, the location of top left character is reported as 1:0.It would be more consistent and precise to
+ 1
the column as well and to report the top left character as 1:1. (Or to remove+ 1
from the line. Somehow 1:1 sounds like better idea.)