Note: I had help generating this report with Gemini, to get more accurate terminology to better describe the issues.
Summary:** In Cubase 15 (API v1.3), automatic regeneration of the .api workspace folder breaks IntelliSense and JSDoc type checking in VS Code. The generated jsconfig.json and midiremote_api_v1.d.ts contain syntax and configuration conflicts that prevent VS Code’s TypeScript Language Server from indexing API classes.
Steps to Reproduce:
-
Create or open a MIDI Remote project in Cubase 15.
-
Reference any API class in a JSDoc block (e.g.,
/** @type {MR_SurfaceCustomValueVariable} */) in your Midi Remote script (such as for custom objects that you might create). -
Inspect
.api/v1/midiremote_api_v1.d.tsandmidiremote_api.v1.js.
Observed Behavior:
-
Unresolved Global Types: JSDoc type annotations fail to resolve API classes (
Cannot find name 'MR_SurfaceCustomValueVariable'). -
Invalid
.d.tsSyntax Errors: Openingmidiremote_api_v1.d.tsshows syntax errors on top-level classes (Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier), among other similar errors lower in the file. -
Module Path Conflict:
jsconfig.jsonmaps"midiremote_api_v1": [".api/v1/midiremote_api_v1.js"]. Mapping to.jsinstead of the declaration file or directory breaks ambient type loading. -
Deprecated Option Error:
jsconfig.jsonincludes"ignoreDeprecations": "6.0", causing compiler diagnostic warnings if VS Code is not using TypeScript v6. -
Auto-Overwrite: Any manual fixes to
jsconfig.jsonor.d.tsare overwritten on script refresh.
Expected Behavior:
-
jsconfig.jsonshould map path aliases to the directory (".api/v1") or.d.tsfile so ambient types load globally. -
Classes inside
midiremote_api_v1.d.tsshould use ambient declaration syntax (declare class MR_...) or be structured as a valid module export.
Work-Around:
-
Open
.api/v1/midiremote_api_v1.d.tsand copy its contents. -
Create a new file called
cubase_api.d.ts(or something similar) next to your MIDI Remote .js script (in the same folder as the script) and paste the contents from the prior step into this new file. -
In the “Driver Scripts” folder, create a new folder called
.vscodeand inside of it, create a new file calledsettings.json. -
Paste this into settings.json:
{ "files.exclude": { "**/.api": true }, "search.exclude": { "**/.api": true } } -
Save the
settings.jsonfile, as well as thecubase_api.d.tsfiles. This hides the Steinberg auto-generated .api directory from VS Code, and since thecubase_api.d.tsfile is located in the same directory as the script, it’s automatically parsed as a Global Ambient Declaration file.