Skip to content
This repository was archived by the owner on Apr 1, 2020. It is now read-only.

Improve typescript error reporting #1161

Merged
merged 12 commits into from
Dec 21, 2017
Merged

Improve typescript error reporting #1161

merged 12 commits into from
Dec 21, 2017

Conversation

bryphe
Copy link
Member

@bryphe bryphe commented Dec 20, 2017

Issue: When typing in insert mode, the diagnostics often get into a bad state (showing extra errors)

Defect: We're often overwriting existing lines with the newly-inserted line, and that causes extraneous errors to show up. In other words, our changeLineInFile method in TypeScriptServerHost is causing the document to be out-of-sync.

Fix: Tweak the offsets / newline behavior for better results. Also added a debug.typescript.saveFile flag, which saves the state the typescript server thinks for the file, so it's easier to debug and see this case.

@bryphe bryphe merged commit 77c65b4 into master Dec 21, 2017
@bryphe bryphe deleted the bryphe/typescript/errors branch December 21, 2017 19:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant