Skip to content

Conversation

@CGNonofr
Copy link
Contributor

in #742, standalone language features types were broken

In monaco-editor 0.55, microsoft moved language feature namespaces to top level.

The way it's bundled also changed:

  • before: each contribution was assigning its "namespace" to the languages namespace
  • after: a single file is exporting all the standalone language feature namespaces on top of the editor types

Since monaco-vscode-api is modular (each language feature can be installed separately), that file can't be used.

So instead, the api was made a bit different: instead of relyng on monaco.typescript object, the namespace is exported by the standalone language feature package.

before:

import * as monaco from 'monaco-editor'

monaco.languages.typescript.typescriptDefaults.addExtraLib(...)

with monaco 0.55:

import * as monaco from 'monaco-editor'

monaco.typescript.typescriptDefaults.addExtraLib(...)

with monaco-vscode-api:

import * as typescript from '@codingame/monaco-vscode-standalone-typescript-language-features'

typescript.typescriptDefaults.addExtraLib(...)

This is already how monaco-vscode-api@23.2.0 should be used, but unfortunately, the types are wrong, and @codingame/monaco-vscode-standalone-typescript-language-features types are just export {}

This MR fixes that: the types are now correct

@CGNonofr CGNonofr requested a review from kaisalmen November 25, 2025 15:18
Copy link
Collaborator

@kaisalmen kaisalmen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I haven't had to the previous release, yet.

@CGNonofr CGNonofr merged commit 21c4067 into main Nov 25, 2025
2 checks passed
@CGNonofr CGNonofr deleted the lmn/fix-standalone-language-features-types branch November 25, 2025 16:22
@github-actions
Copy link

🎉 This PR is included in version 23.2.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants