The typescript plugin ts-plugin won't work with typescript 5 #2

Open
opened 2023-04-21 07:21:53 +00:00 by tonyg · 2 comments
Owner

From package.json's devDependencies; working:

    "typescript": "^4.9",
    "typescript-language-server": "^3.0"

and not working:

    "tslib": "^2.5.0",
    "typescript": "^5.0.4",
    "typescript-language-server": "^3.3.1"
From `package.json`'s `devDependencies`; working: ```json "typescript": "^4.9", "typescript-language-server": "^3.0" ``` and not working: ```json "tslib": "^2.5.0", "typescript": "^5.0.4", "typescript-language-server": "^3.3.1" ```
Author
Owner

The plugin won't load. It complains about the hooking of ts.createSourceFile (and will no doubt complain similarly about ts.server.ScriptInfo), because those properties were created by Object.defineProperty without configurability. I... don't think this current approach can be rescued, in the face of this.

Perhaps write a for-real LSP plugin, delegating to tsserver? :-/

The plugin won't load. It complains about the hooking of `ts.createSourceFile` (and will no doubt complain similarly about `ts.server.ScriptInfo`), because those properties were created by `Object.defineProperty` without configurability. I... don't think this current approach can be rescued, in the face of this. Perhaps write a for-real LSP plugin, delegating to tsserver? :-/
tonyg changed title from The typescript plugin ts-plugin doesn't seem to work with typescript 5 to The typescript plugin ts-plugin won't work with typescript 5 2023-04-29 08:58:04 +00:00
Author
Owner
I [blogged about this](https://syndicate-lang.org/journal/2023/04/29/syndicate-ts-plugin).
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: syndicate-lang/syndicate-js#2
No description provided.