-
Notifications
You must be signed in to change notification settings - Fork 99
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 #1472 from mydea/fn/test-helper-types
Update types & ember to 4.x
- Loading branch information
Showing
16 changed files
with
788 additions
and
563 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
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
2 changes: 1 addition & 1 deletion
2
.../templates/components/js-importing-ts.hbs → .../dummy/app/components/js-importing-ts.hbs
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,6 +1,6 @@ | ||
<div style="border: 2px solid black;width: 100%; background-color: azure; margin-top: 20px; padding: 0 0 20px 20px"> | ||
<p style="margin-top: 0px; border-bottom: chocolate 1px solid">js-importing-ts.hbs</p> | ||
{{poke}} | ||
{{this.poke}} | ||
<p>Ts helper: {{typed-help}}</p> | ||
<p>Js helper: {{js-help}}</p> | ||
</div> |
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,8 +1,9 @@ | ||
import Component from '@ember/component'; | ||
import { equal } from '@ember/object/computed'; | ||
import Component from '@glimmer/component'; | ||
|
||
import * as constants from '../lib/some-const'; | ||
|
||
export default Component.extend({ | ||
poke: equal('ha', constants.CHANGE), | ||
}); | ||
export default class JsImportingTs extends Component { | ||
get poke() { | ||
return constants.CHANGE === 'ha'; | ||
} | ||
} |
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,5 @@ | ||
import Component from '@ember/component'; | ||
import Component from '@glimmer/component'; | ||
|
||
export default Component.extend({ | ||
someValue: 'from component', | ||
}); | ||
export default class TestOne extends Component { | ||
someValue = 'from component'; | ||
} |
4 changes: 2 additions & 2 deletions
4
...app/templates/components/ts-component.hbs → tests/dummy/app/components/ts-component.hbs
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,9 +1,9 @@ | ||
import Component from '@ember/component'; | ||
import Component from '@glimmer/component'; | ||
|
||
function compute(): { value: string } { | ||
return { value: 'from component' }; | ||
} | ||
|
||
export default Component.extend({ | ||
someValue: compute().value, | ||
}); | ||
export default class TsComponent extends Component { | ||
someValue = compute().value; | ||
} |
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,7 +1,7 @@ | ||
import Controller from '@ember/controller'; | ||
|
||
export default Controller.extend({ | ||
export default class ApplicationController extends Controller { | ||
// Just a very roundabout way of using some ES6 features | ||
value: ((test = 'Test') => `${test} ${'Value'}`)(), | ||
foo: 'hello', | ||
}); | ||
value = ((test = 'Test') => `${test} ${'Value'}`)(); | ||
foo = 'hello'; | ||
} |
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
Empty file.
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.