-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vlad Balin
committed
May 1, 2019
1 parent
6242ea8
commit e1ea3d5
Showing
5 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
!!!! | ||
|
||
Generate lazy link accessors? | ||
Yes, with dedicated class decorator. @linked | ||
Or, make it configurable. | ||
|
||
import { LinkAttributes } 'type-r-link' | ||
import { Model } from 'type-r' | ||
LinkAttributes( Model ); | ||
|
||
get $name(){ | ||
return this.$at( '$name' ); | ||
} | ||
|
||
+ Cool in JS | ||
- Doesn't work in TS | ||
|
||
// New API. | ||
|
||
user.$at('name') // user.linkAt( 'name' ) | ||
|
||
// For the Component: | ||
user.state$() // user.linkAll() | ||
|
||
// For the model: | ||
user.pick$() // user.linkAll() | ||
|
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
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
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