Interface decorators
Interface decorators for JavaScript
Usage
You'll need babel in your project, see notes.
Example rollup config:
// rollup.config.js input: 'src/index.js' output: file: 'public/index.js' format: 'esm' name: 'core' plugins:
Example
@Interface {} static {} @Interface {} @ // has to implement serialize, distanceTo and static deserialize const player = // true // true
Notes
JavaScript
Well, decorators are not part of the official spec and may never be. By the time of writing this readme they are in stage-2 proposal
TypeScript
I have no idea if they'll work in typescript or not i'm a js dev, not a ts one.