-
Notifications
You must be signed in to change notification settings - Fork 887
Convert fs.*Sync to async equivalents internally #3333
Comments
Switching to async IO in Regarding changes to We can probably reconsider this as soon as TypeScript starts to support async APIs |
Agreed, this is sub-optimal. My hope was to trivially change the APIs to async/await to get the API modified, then rewrite.
I'm up for waiting - will try to remember to come back to this if and when the APIs allow async operations. |
@ajafff is correct, the tslint-language-service runs inside the TypeScript server and the TypeScript host APIs are sync APIs. For example, computing the lint warnings is expected to be a sync operation, see https://github.com/angelozerr/tslint-language-service/blob/88791766ec122d0cf315af7502d38049549b9837/src/index.ts#L304. An async The situation is different in the vscode-tslint extension, there async APIs are supported as well and an async |
Spinning off of #2328: it's generally bad practice to use synchronous
fs
APIs, as they are blocking. Usingasync
equivalents will make it easier to integrate with asynchronous code and I'd love to see some internals' file operations parallelized if possible for performance.The text was updated successfully, but these errors were encountered: