Skip to content

[Bug][0.53.0] type errors in new release #4981

@AviVahl

Description

@AviVahl

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

No response

Monaco Editor Playground Code

Reproduction Steps

mkdir monaco-type-issue
cd monaco-type-issue
npm init -y
npm pkg set type=module
npm i typescript monaco-editor
npx tsc --init --skipLibCheck false
echo "import * as monaco from 'monaco-editor';console.log(monaco.editor);" > main.ts
npx tsc --noEmit

Actual (Problematic) Behavior

node_modules/monaco-editor/esm/vs/editor/editor.api.d.ts:12:32 - error TS2503: Cannot find namespace 'monaco'.

12 declare var MonacoEnvironment: monaco.Environment | undefined;
                                  ~~~~~~

node_modules/monaco-editor/esm/vs/editor/editor.api.d.ts:943:18 - error TS2395: Individual declarations in merged declaration 'editor' must be all exported or all local.

943 export namespace editor {
                     ~~~~~~

node_modules/monaco-editor/esm/vs/editor/editor.api.d.ts:8661:19 - error TS2395: Individual declarations in merged declaration 'editor' must be all exported or all local.

8661 declare namespace editor {
                       ~~~~~~

node_modules/monaco-editor/esm/vs/editor/editor.api.d.ts:8662:12 - error TS1038: A 'declare' modifier cannot be used in an already ambient context.

8662     export declare function createWebWorker<T extends object>(opts: IWebWorkerOptions): editor.MonacoWebWorker<T>;
                ~~~~~~~


Found 4 errors in the same file, starting at: node_modules/monaco-editor/esm/vs/editor/editor.api.d.ts:12

Expected Behavior

No type errors

Additional Context

0.52.x works as expected

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions