Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Dec 18, 2024
1 parent 2ae150e commit c2ca7d4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/model/src/-private/belongs-to.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { deprecate, warn } from '@ember/debug';
import { computed } from '@ember/object';

import { dasherize, singularize } from '@ember-data/request-utils/string';
import {
DEPRECATE_NON_STRICT_TYPES,
DEPRECATE_RELATIONSHIPS_WITHOUT_ASYNC,
Expand All @@ -16,7 +17,6 @@ import { RecordStore } from '@warp-drive/core-types/symbols';
import { lookupLegacySupport } from './legacy-relationships-support';
import type { MinimalLegacyRecord } from './model-methods';
import { isElementDescriptor } from './util';
import { dasherize, singularize } from '@ember-data/request-utils/string';
/**
@module @ember-data/model
*/
Expand Down Expand Up @@ -394,6 +394,7 @@ export function belongsTo<T>(
);
return _belongsTo(type!, options!);
} else {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return isElementDescriptor(arguments as unknown as any[])
? // @ts-expect-error the inbound signature is strict to convince the user to use the non-deprecated signature
(_belongsTo()(...arguments) as RelationshipDecorator<T>)
Expand Down
1 change: 1 addition & 0 deletions packages/model/src/-private/has-many.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ export function hasMany<T>(
);
return _hasMany(type!, options!);
} else {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return isElementDescriptor(arguments as unknown as any[])
? // @ts-expect-error the inbound signature is strict to convince the user to use the non-deprecated signature
(_hasMany()(...arguments) as RelationshipDecorator<T>)
Expand Down
2 changes: 1 addition & 1 deletion packages/model/src/-private/many-array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ function extractIdentifiersFromRecords(records: OpaqueRecordInstance[]): StableR
function extractIdentifierFromRecord(recordOrPromiseRecord: PromiseProxyRecord | OpaqueRecordInstance) {
if (DEPRECATE_PROMISE_PROXIES) {
if (isPromiseRecord(recordOrPromiseRecord)) {
let content = recordOrPromiseRecord.content;
const content = recordOrPromiseRecord.content;
assert(
'You passed in a promise that did not originate from an EmberData relationship. You can only pass promises that come from a belongsTo relationship.',
content !== undefined && content !== null
Expand Down

0 comments on commit c2ca7d4

Please sign in to comment.