Issue: API 1.3 VS Code bug - path mapping and syntax break type resolution

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:

  1. Create or open a MIDI Remote project in Cubase 15.

  2. 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).

  3. Inspect .api/v1/midiremote_api_v1.d.ts and midiremote_api.v1.js.

Observed Behavior:

  • Unresolved Global Types: JSDoc type annotations fail to resolve API classes (Cannot find name 'MR_SurfaceCustomValueVariable').

  • Invalid .d.ts Syntax Errors: Opening midiremote_api_v1.d.ts shows 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.json maps "midiremote_api_v1": [".api/v1/midiremote_api_v1.js"]. Mapping to .js instead of the declaration file or directory breaks ambient type loading.

  • Deprecated Option Error: jsconfig.json includes "ignoreDeprecations": "6.0", causing compiler diagnostic warnings if VS Code is not using TypeScript v6.

  • Auto-Overwrite: Any manual fixes to jsconfig.json or .d.ts are overwritten on script refresh.

Expected Behavior:

  • jsconfig.json should map path aliases to the directory (".api/v1") or .d.ts file so ambient types load globally.

  • Classes inside midiremote_api_v1.d.ts should use ambient declaration syntax (declare class MR_...) or be structured as a valid module export.

Work-Around:

  • Open .api/v1/midiremote_api_v1.d.ts and 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 .vscode and inside of it, create a new file called settings.json.

  • Paste this into settings.json:

    {
    
      "files.exclude": {
    
        "**/.api": true
    
      },
    
      "search.exclude": {
    
        "**/.api": true
    
      }
    
    }
    
  • Save the settings.json file, as well as the cubase_api.d.ts files. This hides the Steinberg auto-generated .api directory from VS Code, and since the cubase_api.d.ts file is located in the same directory as the script, it’s automatically parsed as a Global Ambient Declaration file.