Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { define, Record } from 'type-r';
- @define
- export class Box extends Record {
- static attributes = {
- x : Number,
- y : Number,
- location : String
- }
- get area() {
- return this.x * this.y;
- }
- }
- @define
- export class Arrow extends Record {
- static attributes = {
- from : Box.from( '~boxes' ),
- to : Box.from( '~boxes' )
- }
- }
Add Comment
Please, Sign In to add comment