Language Support
will not be read. The following options are implied for each project:
The implicit
isolatedModules
option means that:const enums is not supported.
Use
export type
when re-exporting TypeScript types and interfaces. For example, useexport type { Foo } from '. /foo';
instead ofexport { Foo } from '. /foo';
.
export =
andimport =
are not supported.Type errors during compilation will be ignored.
is not read at compile time, meaning that the compile option for tsconfig.json
does not affect compilation.
Developers can still use tsconfig.json
in their projects to work with the IDE to implement features such as type checking. In order to make the IDE’s TypeScript checking compatible with the Creator’s behavior, developers need to pay some extra attention to .
- Tutorial: v3.0 TypeScript question answering and experience sharing
- TypeScript - Classes
- TypeScript - DefinitelyTyped
- TypeScript GitHub
- 3 Excuses Developers Give To Avoid TypeScript — and the Better Reasons They Should Use It
JavaScript
The JavaScript language specification supported by the Creator is ES6.
In addition, the following language features or proposals, updated to the ES6 specification, are still supported.
- Promise
- Nullish coalescing operator
??
- Logical assignment operators
- Global object
globalThis
The following language features are also supported, but require the relevant compilation options to be turned on:
Creator opens some compilation options that will be applied to the entire project.
From the user’s perspective, Creator does not bind any JavaScript implementation, so it is recommended that developers write scripts strictly according to the JavaScript specification for better cross-platform support.
For example, when wishing to use global objects, the standard feature globalThis
should be used:
instead of window
, global
, self
or this
:
Again, Creator does not provide a module system for CommonJS, so the following code snippet would pose a problem:
Instead, the standard module syntax should be used: