Skip to content

Commit

Permalink
Merge pull request #1 from TRIPTYK/fix-peek-or-fail-return-type
Browse files Browse the repository at this point in the history
pppd-use-peerdns = 0

fix peekOrFail return type
  • Loading branch information
AmauryD committed Nov 22, 2023
2 parents 9c5ee52 + 1dcfa3a commit 81b93cc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion ember-utils/src/services/extended-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ export default class ExtendedStoreService extends Service {
return record;
}

public peekOrFail<K extends keyof ModelRegistry>(recordType: K, id: string) {
public peekOrFail<K extends keyof ModelRegistry>(
recordType: K,
id: string,
): ModelRegistry[K] {
const record = this.store.peekRecord(recordType, id);
if (!record) {
throw new Error(
Expand Down
2 changes: 1 addition & 1 deletion test-app/app/controllers/docs/helpers/date-format.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Controller from '@ember/controller';

export default class DocsHelpersDateFormatController extends Controller {
date = new Date();
date = new Date();
}
6 changes: 5 additions & 1 deletion test-app/tests/integration/helpers/translate-country-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { hbs } from 'ember-cli-htmlbars';
module('Integration | Helper | translate-country', function (hooks) {
setupRenderingTest(hooks);

function setCountries(this: TestContext, countries: string[] | string, language?: string) {
function setCountries(
this: TestContext,
countries: string[] | string,
language?: string,
) {
this.set('countries', countries);
this.set('language', language);
return countries;
Expand Down

0 comments on commit 81b93cc

Please sign in to comment.