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

Open
opened 1 month ago by tonyg · 2 comments
tonyg commented 1 month ago
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" ```
tonyg commented 1 month ago
Poster
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 1 month ago
tonyg commented 1 month ago
Poster
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
Loading…
There is no content yet.