Created
May 24, 2017 08:34
-
-
Save spoenemann/ec2c4c88b7341513d96373fc1ab7df9b to your computer and use it in GitHub Desktop.
Simple class DSL example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { | |
name: string | |
bag: Bag | |
getCash(): number { | |
bag.wallet.cash | |
} | |
} | |
class Bag { | |
wallet: Wallet | |
} | |
class Wallet { | |
cash: number | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment