-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #274 from pzuraq/feat/decorator-and-class-field-su…
…pport [FEAT] Decorator and Class Field Support
- Loading branch information
Showing
10 changed files
with
797 additions
and
554 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
module.exports = { | ||
root: true, | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
ecmaVersion: 2017, | ||
sourceType: 'module' | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,36 @@ | ||
import Controller from '@ember/controller'; | ||
import { computed } from "@ember/object"; | ||
import { A } from "@ember/array"; | ||
import { computed } from '@ember/object'; | ||
import { A } from '@ember/array'; | ||
import Animal from 'dummy/utils/class-animal'; | ||
|
||
export default Controller.extend({ | ||
init() { | ||
this._super(...arguments); | ||
this.animal = new Animal('dog'); | ||
}, | ||
|
||
animalName: computed({ | ||
get() { | ||
const animal = new Animal('dog'); | ||
return animal.name; | ||
} | ||
return this.animal.name; | ||
}, | ||
}), | ||
|
||
staticAnimalType: computed({ | ||
get() { | ||
return Animal.type; | ||
}, | ||
}), | ||
|
||
// Just a very roundabout way of using some ES6 features | ||
value: ((test = 'Test') => `${test} ${'Value'}`)(), | ||
|
||
// Test a generator (needs the regenerator runtime) and some ES6 constructs (requires the corejs polyfill) | ||
values: A(Array.from({ *[Symbol.iterator]() { yield 'one'; yield 'two'; } })) | ||
values: A( | ||
Array.from({ | ||
*[Symbol.iterator]() { | ||
yield 'one'; | ||
yield 'two'; | ||
}, | ||
}) | ||
), | ||
}); |
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
Oops, something went wrong.