clausreinke / typescript-tools

(repo no longer active) Tools related to the TypeScript language
Apache License 2.0
266 stars 29 forks source link

Errors not showing correctly after update #9

Closed draivin closed 10 years ago

draivin commented 10 years ago

After updating the file some errors stop appearing.

Test case: Create empty file test.ts and run the following:

D:\> tss .\test.ts
"loaded D:/test.ts, TSS listening.."
> update 2 D:/tests.ts
> for(;;)
> 
"updated D:/tests.ts"
>showErrors
[{"file":"D:/tests.ts","start":{"line":2,"character":1},"end":{"line":2,"character":1},"text":"error TS1003: Identifier expected."}]
> update 2 D:/tests.ts
> for(;;)
> ;
"updated D:/tests.ts"
> showErrors
[]
> update 2 D:/tests.ts
> for(;;)
> 
"updated D:/tests.ts"
> showErrors
[]
clausreinke commented 10 years ago

confirmed as bug, fix upcoming (thanks for the useful test case). update was keeping part of the old source when the new source was shorter (so the ; was still there).