plugins: [
"@typescript-eslint",
"ember",
"prettier",
],
This file contains hidden or 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
import Ember from 'ember'; | |
import { assert } from '@ember/debug'; | |
let pending = 0; | |
export function checkPending(): boolean { | |
return pending === 0; | |
} | |
export default function waitForInTests(_target: unknown, _propertyKey: string, desc: PropertyDescriptor): void { |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
isChecked: false, | |
actions: { | |
toggle() { | |
this.toggleProperty('isChecked'); |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
timeZoneOptions: Object.freeze([ | |
{ groupName: "Asia", options:["Kabul","Yerevan","Baku","Dhaka","Brunei","Bangkok","Shanghai","Urumqi","Taipei","Macau","Tbilisi","Dili","Kolkata","Jakarta"]}, | |
{ groupName: "Australia", options: ["Darwin", "Eucla", "Perth", "Brisbane","Lindeman","Adelaide","Hobbart","Currie","Melbourne"]}, | |
]), | |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
foo: { | |
bar: 'Baz' | |
}, | |
uppercaseFooBar: Ember.computed('foo.bar', function () { |
This file contains hidden or 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
const isHidden = | |
option.selectable !== undefined ? option.selectable : | |
hasOptedIntoDisabledOptions ? values.all.length > 1 : | |
getAvailableOptionValues(option, state, constraints).length > 1 ; |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
child: Ember.computed(function () { | |
return this.store.peekRecord('child', '1'); | |
}), | |
init () { |
This file contains hidden or 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
'use strict'; | |
;define("glimmer-component-pods-bug/app", ["exports", "glimmer-component-pods-bug/resolver", "ember-load-initializers", "glimmer-component-pods-bug/config/environment"], function (_exports, _resolver, _emberLoadInitializers, _environment) { | |
"use strict"; | |
Object.defineProperty(_exports, "__esModule", { | |
value: true | |
}); |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
// Fun fact: using an object as a property like this is kinda OK for controllers, | |
// since they are singletons. But the instance of the object will leak across | |
// tests! So please don't do what I do here: | |
foo: { | |
bar: 0 |
This file contains hidden or 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
import DS from 'ember-data'; | |
import RSVP from 'rsvp'; | |
export default DS.JSONAPIAdapter.extend({ | |
updateRecord(store, type, snapshot) { | |
if (snapshot.adapterOptions && snapshot.adapterOptions.withError) { | |
return RSVP.reject(new DS.InvalidError([ | |
{ | |
detail: 'This name is reserved', | |
source: {pointer: '/data/attributes/name'}, |