My .d.ts
A downloadable type declarations
For plugin developers. This file has no runtime effect in RPG Maker.
This is my .d.ts file for both RPG Maker MV and RPG Maker MZ combined, which I use to typecheck my plugins during development. There may be inaccuracies.
This file is updated somewhat often, so please don't redistribute it. You can always grab the most current version at https://tamschi.itch.io/d-ts .
For convenience, these type declarations assume that Scene_Boot
has completed.
Beforehand, many $game…
and $data…
globals may additionally be null
.
Additionally, plugins can make the actual type shapes differ from what is written here.
Use caution and don't consider this a replacement for testing!
To use this file in VS Code, write for example the following above any non-comment JavaScript code in your plugin (as do I):
// @ts-check
/// <reference path="../rmmvmz.d.ts"></reference>
This assumes that the declaration file is placed in the parent directory compared to the plugin. Note that the declarations are very incomplete as I add to them only as needed for my own plugins, so you may have to add more to avoid red squiggles.
You can use JSDoc comments to further annotate the types in your plugin.
VS Code understands TypeScript syntax within JSDoc type annotations.
Published | 13 days ago |
Status | Released |
Category | Other |
Author | Tamschi |
Tags | javascript, RPG Maker, type-declarations, typescript, vscode |
Download
Install instructions
Place the rmmvmz.d.ts file in the parent directory to use it with my typechecked plugins. You may have to restart your code editor or install a language support extension for it to be picked up.
Leave a comment
Log in with itch.io to leave a comment.