Skip to content

Latest commit

 

History

History
41 lines (25 loc) · 1.13 KB

File metadata and controls

41 lines (25 loc) · 1.13 KB

C3IDE2 Type Definitions

Construct 3 IDE 2 is a framework that makes creating Addons for Construct 3 easier.

In this repository you'll find TypeScript Interface definitions for the configurations of the various types of AddOns supported by the IDE.

Installation

You can install this package via NPM:

npm i c3ide2-types -D

Usage

After installing you'll have access to the types.

Using JSDoc, you'll be able to type the config:

image

You should have something like this:

/** @type {import("c3ide2-types").Behavior} */
const Behavior = { 
  //...
};

module.exports = Behavior;

Caution

Do not import Types as a JS module like this: import { Behavior } from "c3ide2-types";. They're TypeScript interfaces, and are not understood by JavaScript. Use them only with JSDoc.


After that, your code editor IntelliSense should start autocompleting the options.

image