Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Code
monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
noSemanticValidation: true,
noSyntaxValidation: false
});
// compiler options
monaco.languages.typescript.javascriptDefaults.setCompilerOptions({
target: monaco.languages.typescript.ScriptTarget.ESNext,
allowNonTsExtensions: true
});
// extra libraries
var libSource = [
'declare class Facts {',
' /**',
' * Returns the next fact',
' */',
' static next():string',
'}'
].join('\n');
var libUri = 'ts:filename/facts.d.ts';
monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, libUri);
// When resolving definitions and references, the editor will try to use created models.
// Creating a model for the library allows "peek definition/references" commands to work with the library.
monaco.editor.createModel(libSource, 'typescript', monaco.Uri.parse(libUri));
var jsCode = [
'"use strict";',
'',
'class Chuck {',
' static #callCount = 1',
' greet() {',
' Chuck.#callCount++;',
' return `${Chuck.#callCount}: ${Facts.next()}`();',
' }',
'}'
].join('\n');
monaco.editor.create(document.getElementById('container'), {
value: jsCode,
language: 'javascript'
});
Reproduction Steps
in a javascript code editor, write a class with #private fields & inspect the token
Actual (Problematic) Behavior
private class fields are tokenised as invalid in monaoc

In VSCode desktop it is tokenised as part of the variable...

Expected Behavior
Private token to be tokenised as part of variable or keywork or other (just not invalid)
Additional Context
No response
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Code
Reproduction Steps
in a
javascriptcode editor, write aclasswith#private fields & inspect the tokenActual (Problematic) Behavior
private class fields are tokenised as

invalidin monaocIn VSCode desktop it is tokenised as part of the variable...

Expected Behavior
Private token to be tokenised as part of variable or keywork or other (just not
invalid)Additional Context
No response