daily pastebin goal
46%
SHARE
TWEET

Untitled

a guest Mar 18th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { define, Record } from 'type-r';
  2.  
  3. @define
  4. export class Box extends Record {
  5.     static attributes = {
  6.         x : Number,
  7.         y : Number,
  8.         location : String    
  9.     }
  10.  
  11.     get area() {
  12.         return this.x * this.y;
  13.     }
  14. }
  15.  
  16. @define
  17. export class Arrow extends Record {
  18.     static attributes = {
  19.         from : Box.from( '~boxes' ),
  20.         to : Box.from( '~boxes' )
  21.     }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top