diff --git a/config/eslint/typescript.cjs b/config/eslint/typescript.cjs index da2e75f5659..08c2d56667c 100644 --- a/config/eslint/typescript.cjs +++ b/config/eslint/typescript.cjs @@ -3,6 +3,13 @@ function rules(config) { { '@typescript-eslint/adjacent-overload-signatures': 'error', '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/consistent-type-exports': 'error', + '@typescript-eslint/consistent-type-imports': [ + 'error', + { + disallowTypeAnnotations: false, + }, + ], 'no-loop-func': 'off', '@typescript-eslint/no-loop-func': 'error', '@typescript-eslint/no-misused-promises': 'off', @@ -10,6 +17,7 @@ function rules(config) { 'no-shadow': 'off', '@typescript-eslint/no-shadow': 'error', 'no-throw-literal': 'off', + '@typescript-eslint/no-import-type-side-effects': 'error', '@typescript-eslint/no-inferrable-types': 'error', '@typescript-eslint/no-meaningless-void-operator': 'error', '@typescript-eslint/no-throw-literal': 'error', diff --git a/packages/active-record/src/-private/builders/-utils.ts b/packages/active-record/src/-private/builders/-utils.ts index 9cae4d3439b..3d711858753 100644 --- a/packages/active-record/src/-private/builders/-utils.ts +++ b/packages/active-record/src/-private/builders/-utils.ts @@ -1,4 +1,4 @@ -import { type UrlOptions } from '@ember-data/request-utils'; +import type { UrlOptions } from '@ember-data/request-utils'; import type { CacheOptions, ConstrainedRequestOptions } from '@warp-drive/core-types/request'; export function copyForwardUrlOptions(urlOptions: UrlOptions, options: ConstrainedRequestOptions): void { diff --git a/packages/active-record/src/-private/builders/save-record.ts b/packages/active-record/src/-private/builders/save-record.ts index ef54bcd49df..7b6a5da0e40 100644 --- a/packages/active-record/src/-private/builders/save-record.ts +++ b/packages/active-record/src/-private/builders/save-record.ts @@ -11,7 +11,7 @@ import { } from '@ember-data/request-utils'; import { recordIdentifierFor } from '@ember-data/store'; import type { StableExistingRecordIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier'; -import { +import type { ConstrainedRequestOptions, CreateRequestOptions, DeleteRequestOptions, diff --git a/packages/adapter/src/index.ts b/packages/adapter/src/index.ts index 7e47b66ec21..a1751a64c37 100644 --- a/packages/adapter/src/index.ts +++ b/packages/adapter/src/index.ts @@ -197,7 +197,7 @@ import type { AdapterPayload, MinimumAdapterInterface, } from '@ember-data/legacy-compat/legacy-network-handler/minimum-adapter-interface'; -import { SerializerOptions } from '@ember-data/legacy-compat/legacy-network-handler/minimum-serializer-interface'; +import type { SerializerOptions } from '@ember-data/legacy-compat/legacy-network-handler/minimum-serializer-interface'; import type Store from '@ember-data/store'; import type { ModelSchema } from '@ember-data/store/-types/q/ds-model'; diff --git a/packages/adapter/src/rest.ts b/packages/adapter/src/rest.ts index 6255e555c2e..d16566a0172 100644 --- a/packages/adapter/src/rest.ts +++ b/packages/adapter/src/rest.ts @@ -16,7 +16,7 @@ import type { ModelSchema } from '@ember-data/store/-types/q/ds-model'; import type { HTTPMethod } from '@warp-drive/core-types/request'; import { determineBodyPromise, fetch, parseResponseHeaders, serializeIntoHash, serializeQueryParams } from './-private'; -import { MixtBuildURLMixin } from './-private/build-url-mixin'; +import type { MixtBuildURLMixin } from './-private/build-url-mixin'; import type { FastBoot } from './-private/fastboot-interface'; import AdapterError, { AbortError, diff --git a/packages/core-types/src/cache.ts b/packages/core-types/src/cache.ts index 5cc681588ea..010c342b9e6 100644 --- a/packages/core-types/src/cache.ts +++ b/packages/core-types/src/cache.ts @@ -1,17 +1,16 @@ /** * @module @ember-data/experimental-preview-types */ -import { ResourceBlob } from './cache/aliases'; -import { Change } from './cache/change'; -import { Mutation } from './cache/mutations'; -import { Operation } from './cache/operations'; +import type { ResourceBlob } from './cache/aliases'; +import type { Change } from './cache/change'; +import type { Mutation } from './cache/mutations'; +import type { Operation } from './cache/operations'; import type { CollectionRelationship, ResourceRelationship } from './cache/relationship'; -import type { StableRecordIdentifier } from './identifier'; -import { StableDocumentIdentifier } from './identifier'; +import type { StableDocumentIdentifier, StableRecordIdentifier } from './identifier'; import type { Value } from './json/raw'; import type { RequestContext, StructuredDataDocument, StructuredDocument } from './request'; -import { ResourceDocument, SingleResourceDataDocument } from './spec/document'; -import { ApiError } from './spec/error'; +import type { ResourceDocument, SingleResourceDataDocument } from './spec/document'; +import type { ApiError } from './spec/error'; /** * A hash of changed attributes with the key being the attribute name and the value being an diff --git a/packages/core-types/src/spec/raw.ts b/packages/core-types/src/spec/raw.ts index 5e4446e8c33..412dbe746ae 100644 --- a/packages/core-types/src/spec/raw.ts +++ b/packages/core-types/src/spec/raw.ts @@ -1,7 +1,7 @@ /* @module @warp-drive/core-types */ -import { ArrayValue, ObjectValue } from '../json/raw'; +import type { ArrayValue, ObjectValue } from '../json/raw'; export type Meta = ObjectValue; export type LinkObject = { href: string; meta?: Meta }; diff --git a/packages/diagnostic/src/-types.ts b/packages/diagnostic/src/-types.ts index 95c15e211b9..1a9eebf3f4b 100644 --- a/packages/diagnostic/src/-types.ts +++ b/packages/diagnostic/src/-types.ts @@ -1,4 +1,4 @@ -import { SuiteReport } from './-types/report'; +import type { SuiteReport } from './-types/report'; export type CompatTestReport = { id: number; diff --git a/packages/diagnostic/src/-utils.ts b/packages/diagnostic/src/-utils.ts index 21610605c68..31dde59ef91 100644 --- a/packages/diagnostic/src/-utils.ts +++ b/packages/diagnostic/src/-utils.ts @@ -1,5 +1,5 @@ /* global window, globalThis, global, self */ -import { GlobalHooksStorage, HooksCallback, ModuleInfo, TestContext } from './-types'; +import type { GlobalHooksStorage, HooksCallback, ModuleInfo, TestContext } from './-types'; export function assert(message: string, test: unknown): asserts test { if (!test) { diff --git a/packages/diagnostic/src/ember.ts b/packages/diagnostic/src/ember.ts index b3befd04044..5ae8277f9fb 100644 --- a/packages/diagnostic/src/ember.ts +++ b/packages/diagnostic/src/ember.ts @@ -1,4 +1,5 @@ -import { getTestMetadata, setupContext, SetupContextOptions, teardownContext, TestContext } from '@ember/test-helpers'; +import type { SetupContextOptions, TestContext } from '@ember/test-helpers'; +import { getTestMetadata, setupContext, teardownContext } from '@ember/test-helpers'; import AbstractTestLoader from 'ember-cli-test-loader/test-support/index'; diff --git a/packages/diagnostic/src/emitters/diagnostic.ts b/packages/diagnostic/src/emitters/diagnostic.ts index 66fc4330b2a..5d7c20cfe6d 100644 --- a/packages/diagnostic/src/emitters/diagnostic.ts +++ b/packages/diagnostic/src/emitters/diagnostic.ts @@ -1,5 +1,5 @@ -import { CompatTestReport, Emitter } from '../-types'; -import { SuiteReport } from '../-types/report'; +import type { CompatTestReport, Emitter } from '../-types'; +import type { SuiteReport } from '../-types/report'; import { assert } from '../-utils'; type EmitEvent = { diff --git a/packages/diagnostic/src/emitters/testem.ts b/packages/diagnostic/src/emitters/testem.ts index e6dc4b228af..33b29a628f0 100644 --- a/packages/diagnostic/src/emitters/testem.ts +++ b/packages/diagnostic/src/emitters/testem.ts @@ -1,5 +1,5 @@ -import { CompatTestReport, Emitter } from '../-types'; -import { SuiteReport } from '../-types/report'; +import type { CompatTestReport, Emitter } from '../-types'; +import type { SuiteReport } from '../-types/report'; import { assert } from '../-utils'; type TestemSocket = { diff --git a/packages/diagnostic/src/index.ts b/packages/diagnostic/src/index.ts index ad40e6025d9..92eee74002c 100644 --- a/packages/diagnostic/src/index.ts +++ b/packages/diagnostic/src/index.ts @@ -1,5 +1,5 @@ -import { ModuleCallback, ModuleInfo, OrderedMap, TestCallback, TestContext, TestInfo } from './-types'; -import { SuiteReport } from './-types/report'; +import type { ModuleCallback, ModuleInfo, OrderedMap, TestCallback, TestContext, TestInfo } from './-types'; +import type { SuiteReport } from './-types/report'; import { assert, generateHash } from './-utils'; import { Config, getCurrentModule, HooksDelegate, instrument, setCurrentModule } from './internals/config'; import { DelegatingReporter } from './internals/delegating-reporter'; diff --git a/packages/diagnostic/src/internals/config.ts b/packages/diagnostic/src/internals/config.ts index 01ecb0b166a..c754ed17b3c 100644 --- a/packages/diagnostic/src/internals/config.ts +++ b/packages/diagnostic/src/internals/config.ts @@ -1,5 +1,5 @@ /* global Testem */ -import { +import type { GlobalCallback, GlobalConfig, GlobalHooks, diff --git a/packages/diagnostic/src/internals/delegating-reporter.ts b/packages/diagnostic/src/internals/delegating-reporter.ts index 5dd1e24d87c..8b0163c65a6 100644 --- a/packages/diagnostic/src/internals/delegating-reporter.ts +++ b/packages/diagnostic/src/internals/delegating-reporter.ts @@ -1,4 +1,4 @@ -import { Reporter, SuiteReport } from '../-types/report'; +import type { Reporter, SuiteReport } from '../-types/report'; const Reporters = new Set(); export function registerReporter(reporter: Reporter) { diff --git a/packages/diagnostic/src/internals/diagnostic.ts b/packages/diagnostic/src/internals/diagnostic.ts index 857a97f0096..13cb703953e 100644 --- a/packages/diagnostic/src/internals/diagnostic.ts +++ b/packages/diagnostic/src/internals/diagnostic.ts @@ -1,5 +1,5 @@ -import { GlobalConfig, TestContext, TestInfo } from '../-types'; -import { DiagnosticReport, Reporter, TestReport } from '../-types/report'; +import type { GlobalConfig, TestContext, TestInfo } from '../-types'; +import type { DiagnosticReport, Reporter, TestReport } from '../-types/report'; import equiv from '../legacy/equiv'; class InternalCompat { diff --git a/packages/diagnostic/src/internals/run.ts b/packages/diagnostic/src/internals/run.ts index 4745409ffda..f2fab1b980c 100644 --- a/packages/diagnostic/src/internals/run.ts +++ b/packages/diagnostic/src/internals/run.ts @@ -1,5 +1,5 @@ -import { HooksCallback, ModuleInfo, TestContext, TestInfo } from '../-types'; -import { ModuleReport, TestReport } from '../-types/report'; +import type { HooksCallback, ModuleInfo, TestContext, TestInfo } from '../-types'; +import type { ModuleReport, TestReport } from '../-types/report'; import { getChain } from '../-utils'; import { Config, groupLogs, instrument } from './config'; import { DelegatingReporter } from './delegating-reporter'; diff --git a/packages/diagnostic/src/reporters/dom.ts b/packages/diagnostic/src/reporters/dom.ts index 98585e11044..1214ee0513b 100644 --- a/packages/diagnostic/src/reporters/dom.ts +++ b/packages/diagnostic/src/reporters/dom.ts @@ -1,5 +1,5 @@ -import { CompatTestReport, Emitter } from '../-types'; -import { DiagnosticReport, ModuleReport, Reporter, SuiteReport, TestReport } from '../-types/report'; +import type { CompatTestReport, Emitter } from '../-types'; +import type { DiagnosticReport, ModuleReport, Reporter, SuiteReport, TestReport } from '../-types/report'; import { getSettings, updateConfigValue, updateSuiteState } from '../internals/config'; type SuiteLayout = { diff --git a/packages/diagnostic/src/runners/dom.ts b/packages/diagnostic/src/runners/dom.ts index 8eb7c5a9633..0dbd669a533 100644 --- a/packages/diagnostic/src/runners/dom.ts +++ b/packages/diagnostic/src/runners/dom.ts @@ -1,7 +1,8 @@ import { registerReporter, start as _start } from '../'; import type { Emitter } from '../-types'; import { assert, getGlobal } from '../-utils'; -import { ConfigOptions, configure, getSettings } from '../internals/config'; +import type { ConfigOptions} from '../internals/config'; +import { configure, getSettings } from '../internals/config'; import { DOMReporter } from '../reporters/dom'; export async function start(config?: ConfigOptions) { diff --git a/packages/graph/src/-private/-diff.ts b/packages/graph/src/-private/-diff.ts index 3d57c261acd..7c40423f7fa 100644 --- a/packages/graph/src/-private/-diff.ts +++ b/packages/graph/src/-private/-diff.ts @@ -7,8 +7,8 @@ import type { StableRecordIdentifier } from '@warp-drive/core-types'; import { isBelongsTo } from './-utils'; import { assertPolymorphicType } from './debug/assert-polymorphic-type'; import type { CollectionEdge } from './edges/collection'; -import { ResourceEdge } from './edges/resource'; -import { Graph } from './graph'; +import type { ResourceEdge } from './edges/resource'; +import type { Graph } from './graph'; import replaceRelatedRecord from './operations/replace-related-record'; import replaceRelatedRecords from './operations/replace-related-records'; diff --git a/packages/graph/src/-private/-utils.ts b/packages/graph/src/-private/-utils.ts index ef2d6fbf0bd..ae508ee0090 100644 --- a/packages/graph/src/-private/-utils.ts +++ b/packages/graph/src/-private/-utils.ts @@ -6,9 +6,9 @@ import { peekCache } from '@ember-data/store/-private'; import type { CacheCapabilitiesManager } from '@ember-data/store/-types/q/cache-store-wrapper'; import type { StableRecordIdentifier } from '@warp-drive/core-types'; import type { UpdateRelationshipOperation } from '@warp-drive/core-types/graph'; -import { ResourceIdentifierObject } from '@warp-drive/core-types/spec/raw'; +import type { ResourceIdentifierObject } from '@warp-drive/core-types/spec/raw'; -import { UpgradedMeta } from './-edge-definition'; +import type { UpgradedMeta } from './-edge-definition'; import { coerceId } from './coerce-id'; import type { CollectionEdge } from './edges/collection'; import type { ImplicitEdge } from './edges/implicit'; diff --git a/packages/graph/src/-private/graph.ts b/packages/graph/src/-private/graph.ts index 8e8982eb9a0..9153fb0678f 100644 --- a/packages/graph/src/-private/graph.ts +++ b/packages/graph/src/-private/graph.ts @@ -2,7 +2,7 @@ import { assert } from '@ember/debug'; import { LOG_GRAPH } from '@ember-data/debugging'; import { DEBUG } from '@ember-data/env'; -import { MergeOperation } from '@ember-data/store/-types/q/cache'; +import type { MergeOperation } from '@ember-data/store/-types/q/cache'; import type { CacheCapabilitiesManager } from '@ember-data/store/-types/q/cache-store-wrapper'; import type { StableRecordIdentifier } from '@warp-drive/core-types'; import type { RelationshipDiff } from '@warp-drive/core-types/cache'; @@ -29,7 +29,8 @@ import { removeIdentifierCompletelyFromRelationship, } from './-utils'; import { type CollectionEdge, createCollectionEdge, legacyGetCollectionRelationshipData } from './edges/collection'; -import { createImplicitEdge, ImplicitEdge, ImplicitMeta } from './edges/implicit'; +import type { ImplicitEdge, ImplicitMeta } from './edges/implicit'; +import { createImplicitEdge } from './edges/implicit'; import { createResourceEdge, legacyGetResourceRelationshipData, type ResourceEdge } from './edges/resource'; import addToRelatedRecords from './operations/add-to-related-records'; import { mergeIdentifier } from './operations/merge-identifier'; diff --git a/packages/graph/src/-private/operations/update-relationship.ts b/packages/graph/src/-private/operations/update-relationship.ts index 672c32b5eaf..8a467b7fe34 100644 --- a/packages/graph/src/-private/operations/update-relationship.ts +++ b/packages/graph/src/-private/operations/update-relationship.ts @@ -1,6 +1,6 @@ import { assert, warn } from '@ember/debug'; -import { IdentifierCache } from '@ember-data/store/-private/caches/identifier-cache'; +import type { IdentifierCache } from '@ember-data/store/-private/caches/identifier-cache'; import type { StableRecordIdentifier } from '@warp-drive/core-types'; import type { UpdateRelationshipOperation } from '@warp-drive/core-types/graph'; import type { ExistingResourceIdentifierObject, NewResourceIdentifierObject } from '@warp-drive/core-types/spec/raw'; diff --git a/packages/json-api/src/-private/builders/-utils.ts b/packages/json-api/src/-private/builders/-utils.ts index b37282ee6eb..937b294e180 100644 --- a/packages/json-api/src/-private/builders/-utils.ts +++ b/packages/json-api/src/-private/builders/-utils.ts @@ -1,13 +1,9 @@ /** * @module @ember-data/json-api/request */ -import { - buildQueryParams as buildParams, - BuildURLConfig, - setBuildURLConfig as setConfig, -} from '@ember-data/request-utils'; -import { type UrlOptions } from '@ember-data/request-utils'; -import { QueryParamsSource } from '@warp-drive/core-types/params'; +import type { BuildURLConfig, UrlOptions } from '@ember-data/request-utils'; +import { buildQueryParams as buildParams, setBuildURLConfig as setConfig } from '@ember-data/request-utils'; +import type { QueryParamsSource } from '@warp-drive/core-types/params'; import type { CacheOptions, ConstrainedRequestOptions } from '@warp-drive/core-types/request'; export interface JSONAPIConfig extends BuildURLConfig { diff --git a/packages/json-api/src/-private/builders/save-record.ts b/packages/json-api/src/-private/builders/save-record.ts index 5b4073e9be7..1304666dded 100644 --- a/packages/json-api/src/-private/builders/save-record.ts +++ b/packages/json-api/src/-private/builders/save-record.ts @@ -10,7 +10,7 @@ import { } from '@ember-data/request-utils'; import { recordIdentifierFor } from '@ember-data/store'; import type { StableExistingRecordIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier'; -import { +import type { ConstrainedRequestOptions, CreateRequestOptions, DeleteRequestOptions, diff --git a/packages/json-api/src/-private/cache.ts b/packages/json-api/src/-private/cache.ts index 1039814cd7b..5dc28b6ab9c 100644 --- a/packages/json-api/src/-private/cache.ts +++ b/packages/json-api/src/-private/cache.ts @@ -29,7 +29,7 @@ import type { StableExistingRecordIdentifier, StableRecordIdentifier, } from '@warp-drive/core-types/identifier'; -import { Value } from '@warp-drive/core-types/json/raw'; +import type { Value } from '@warp-drive/core-types/json/raw'; import type { StructuredDataDocument, StructuredDocument, diff --git a/packages/legacy-compat/src/legacy-network-handler/fetch-manager.ts b/packages/legacy-compat/src/legacy-network-handler/fetch-manager.ts index 5b4059cefdb..64f7e82bb81 100644 --- a/packages/legacy-compat/src/legacy-network-handler/fetch-manager.ts +++ b/packages/legacy-compat/src/legacy-network-handler/fetch-manager.ts @@ -20,7 +20,7 @@ import type { CollectionResourceDocument, SingleResourceDocument } from '@warp-d import { upgradeStore } from '../-private'; import { assertIdentifierHasId } from './identifier-has-id'; import { payloadIsNotBlank } from './legacy-data-utils'; -import { AdapterPayload, MinimumAdapterInterface } from './minimum-adapter-interface'; +import type { AdapterPayload, MinimumAdapterInterface } from './minimum-adapter-interface'; import type { MinimumSerializerInterface } from './minimum-serializer-interface'; import { normalizeResponseHelper } from './serializer-response'; import Snapshot from './snapshot'; diff --git a/packages/model/src/-private/hooks.ts b/packages/model/src/-private/hooks.ts index 06d4e8ce4b3..0fbfed67c4b 100644 --- a/packages/model/src/-private/hooks.ts +++ b/packages/model/src/-private/hooks.ts @@ -6,7 +6,7 @@ import type { StableRecordIdentifier } from '@warp-drive/core-types'; import type { Cache } from '@warp-drive/core-types/cache'; import type { ModelStore } from './model'; -import Model from './model'; +import type Model from './model'; import { getModelFactory } from './schema-provider'; import { normalizeModelName } from './util'; diff --git a/packages/model/src/-private/many-array.ts b/packages/model/src/-private/many-array.ts index 5799be88465..0b57eb26057 100644 --- a/packages/model/src/-private/many-array.ts +++ b/packages/model/src/-private/many-array.ts @@ -12,7 +12,7 @@ import { recordIdentifierFor, SOURCE, } from '@ember-data/store/-private'; -import { IdentifierArrayCreateOptions } from '@ember-data/store/-private/record-arrays/identifier-array'; +import type { IdentifierArrayCreateOptions } from '@ember-data/store/-private/record-arrays/identifier-array'; import type { CreateRecordProperties } from '@ember-data/store/-private/store-service'; import type { Cache } from '@ember-data/store/-types/q/cache'; import type { ModelSchema } from '@ember-data/store/-types/q/ds-model'; @@ -21,7 +21,7 @@ import type { FindOptions } from '@ember-data/store/-types/q/store'; import type { StableRecordIdentifier } from '@warp-drive/core-types'; import type { Links, PaginationLinks } from '@warp-drive/core-types/spec/raw'; -import { LegacySupport } from './legacy-relationships-support'; +import type { LegacySupport } from './legacy-relationships-support'; export interface ManyArrayCreateArgs { identifiers: StableRecordIdentifier[]; diff --git a/packages/model/src/-private/model-methods.ts b/packages/model/src/-private/model-methods.ts index 86723f5ca78..381d3e9abad 100644 --- a/packages/model/src/-private/model-methods.ts +++ b/packages/model/src/-private/model-methods.ts @@ -3,13 +3,14 @@ import { assert } from '@ember/debug'; import { importSync } from '@embroider/macros'; import { upgradeStore } from '@ember-data/legacy-compat/-private'; -import Store, { recordIdentifierFor } from '@ember-data/store'; +import type Store from '@ember-data/store'; +import { recordIdentifierFor } from '@ember-data/store'; import { peekCache } from '@ember-data/store/-private'; import { RecordStore } from '@warp-drive/core-types/symbols'; -import Errors from './errors'; +import type Errors from './errors'; import { lookupLegacySupport } from './legacy-relationships-support'; -import RecordState from './record-state'; +import type RecordState from './record-state'; export interface MinimalLegacyRecord { errors: Errors; diff --git a/packages/model/src/-private/notify-changes.ts b/packages/model/src/-private/notify-changes.ts index 06f3842dd0f..12d95c46091 100644 --- a/packages/model/src/-private/notify-changes.ts +++ b/packages/model/src/-private/notify-changes.ts @@ -4,7 +4,7 @@ import { cacheFor } from '@ember/object/internals'; import type Store from '@ember-data/store'; import type { NotificationType } from '@ember-data/store/-private/managers/notification-manager'; import type { StableRecordIdentifier } from '@warp-drive/core-types'; -import { RelationshipSchema } from '@warp-drive/core-types/schema'; +import type { RelationshipSchema } from '@warp-drive/core-types/schema'; import { LEGACY_SUPPORT } from './legacy-relationships-support'; import type Model from './model'; diff --git a/packages/model/src/-private/promise-belongs-to.ts b/packages/model/src/-private/promise-belongs-to.ts index 30ea87cad2f..67a2673d96d 100644 --- a/packages/model/src/-private/promise-belongs-to.ts +++ b/packages/model/src/-private/promise-belongs-to.ts @@ -7,7 +7,7 @@ import type Store from '@ember-data/store'; import type { RecordInstance } from '@ember-data/store/-types/q/record-instance'; import { cached } from '@ember-data/tracking'; -import { LegacySupport } from './legacy-relationships-support'; +import type { LegacySupport } from './legacy-relationships-support'; import { PromiseObject } from './promise-proxy-base'; import type BelongsToReference from './references/belongs-to'; diff --git a/packages/model/src/-private/promise-many-array.ts b/packages/model/src/-private/promise-many-array.ts index 9f17ecc6636..439ee3ff2f1 100644 --- a/packages/model/src/-private/promise-many-array.ts +++ b/packages/model/src/-private/promise-many-array.ts @@ -1,7 +1,7 @@ import { assert } from '@ember/debug'; import { DEPRECATE_COMPUTED_CHAINS } from '@ember-data/deprecations'; -import { FindOptions } from '@ember-data/store/-types/q/store'; +import type { FindOptions } from '@ember-data/store/-types/q/store'; import { compat } from '@ember-data/tracking'; import { defineSignal } from '@ember-data/tracking/-private'; diff --git a/packages/model/src/-private/references/belongs-to.ts b/packages/model/src/-private/references/belongs-to.ts index 4ea5847dd31..f40d758fda1 100644 --- a/packages/model/src/-private/references/belongs-to.ts +++ b/packages/model/src/-private/references/belongs-to.ts @@ -17,7 +17,8 @@ import type { } from '@warp-drive/core-types/spec/raw'; import { assertPolymorphicType } from '../debug/assert-polymorphic-type'; -import { areAllInverseRecordsLoaded, LEGACY_SUPPORT, LegacySupport } from '../legacy-relationships-support'; +import type { LegacySupport } from '../legacy-relationships-support'; +import { areAllInverseRecordsLoaded, LEGACY_SUPPORT } from '../legacy-relationships-support'; /** @module @ember-data/model diff --git a/packages/model/src/-private/references/has-many.ts b/packages/model/src/-private/references/has-many.ts index b375fca733f..68dafe31a3b 100644 --- a/packages/model/src/-private/references/has-many.ts +++ b/packages/model/src/-private/references/has-many.ts @@ -21,7 +21,8 @@ import type { } from '@warp-drive/core-types/spec/raw'; import { assertPolymorphicType } from '../debug/assert-polymorphic-type'; -import { areAllInverseRecordsLoaded, LEGACY_SUPPORT, LegacySupport } from '../legacy-relationships-support'; +import type { LegacySupport } from '../legacy-relationships-support'; +import { areAllInverseRecordsLoaded, LEGACY_SUPPORT } from '../legacy-relationships-support'; import type ManyArray from '../many-array'; /** diff --git a/packages/model/src/-private/schema-provider.ts b/packages/model/src/-private/schema-provider.ts index 78a16ea241b..417152691c4 100644 --- a/packages/model/src/-private/schema-provider.ts +++ b/packages/model/src/-private/schema-provider.ts @@ -6,7 +6,7 @@ import type { RecordIdentifier } from '@warp-drive/core-types/identifier'; import type { AttributesSchema, RelationshipsSchema } from '@warp-drive/core-types/schema'; import type { FactoryCache, ModelFactory, ModelStore } from './model'; -import Model from './model'; +import type Model from './model'; import _modelForMixin from './model-for-mixin'; import { normalizeModelName } from './util'; diff --git a/packages/model/src/migration-support.ts b/packages/model/src/migration-support.ts index 60a39bfab55..fe5de86f17d 100644 --- a/packages/model/src/migration-support.ts +++ b/packages/model/src/migration-support.ts @@ -4,6 +4,8 @@ import { recordIdentifierFor } from '@ember-data/store'; import type { FieldSchema } from '@ember-data/store/-types/q/schema-service'; import { Errors } from './-private'; +import type { + MinimalLegacyRecord} from './-private/model-methods'; import { belongsTo, changedAttributes, @@ -11,7 +13,6 @@ import { deleteRecord, destroyRecord, hasMany, - MinimalLegacyRecord, reload, rollbackAttributes, save, diff --git a/packages/request/src/-private/future.ts b/packages/request/src/-private/future.ts index ca12794b5e9..517daa54589 100644 --- a/packages/request/src/-private/future.ts +++ b/packages/request/src/-private/future.ts @@ -1,7 +1,7 @@ import { IS_FUTURE, type StructuredDocument } from '@warp-drive/core-types/request'; import type { ContextOwner } from './context'; -import { type Deferred, type DeferredFuture, type Future } from './types'; +import type { Deferred, DeferredFuture, Future } from './types'; import { enhanceReason } from './utils'; export function isFuture(maybe: unknown): maybe is Future { diff --git a/packages/request/src/-private/utils.ts b/packages/request/src/-private/utils.ts index e498e2e883d..7a531800ecf 100644 --- a/packages/request/src/-private/utils.ts +++ b/packages/request/src/-private/utils.ts @@ -9,7 +9,7 @@ import { import { Context, ContextOwner } from './context'; import { assertValidRequest } from './debug'; import { createFuture, isFuture } from './future'; -import { type DeferredFuture, type Future, type GodContext, type Handler } from './types'; +import type { DeferredFuture, Future, GodContext, Handler } from './types'; export function curryFuture(owner: ContextOwner, inbound: Future, outbound: DeferredFuture): Future { owner.setStream(inbound.getStream()); diff --git a/packages/rest/src/-private/builders/-utils.ts b/packages/rest/src/-private/builders/-utils.ts index 9cae4d3439b..3d711858753 100644 --- a/packages/rest/src/-private/builders/-utils.ts +++ b/packages/rest/src/-private/builders/-utils.ts @@ -1,4 +1,4 @@ -import { type UrlOptions } from '@ember-data/request-utils'; +import type { UrlOptions } from '@ember-data/request-utils'; import type { CacheOptions, ConstrainedRequestOptions } from '@warp-drive/core-types/request'; export function copyForwardUrlOptions(urlOptions: UrlOptions, options: ConstrainedRequestOptions): void { diff --git a/packages/rest/src/-private/builders/save-record.ts b/packages/rest/src/-private/builders/save-record.ts index 2417dc5d02e..22add8af75d 100644 --- a/packages/rest/src/-private/builders/save-record.ts +++ b/packages/rest/src/-private/builders/save-record.ts @@ -11,7 +11,7 @@ import { } from '@ember-data/request-utils'; import { recordIdentifierFor } from '@ember-data/store'; import type { StableExistingRecordIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier'; -import { +import type { ConstrainedRequestOptions, CreateRequestOptions, DeleteRequestOptions, diff --git a/packages/schema-record/src/-base-fields.ts b/packages/schema-record/src/-base-fields.ts index 36d4f7e2928..d01d7649b1d 100644 --- a/packages/schema-record/src/-base-fields.ts +++ b/packages/schema-record/src/-base-fields.ts @@ -1,7 +1,7 @@ import { assert } from '@ember/debug'; import { recordIdentifierFor } from '@ember-data/store'; -import { RecordInstance } from '@ember-data/store/-types/q/record-instance'; +import type { RecordInstance } from '@ember-data/store/-types/q/record-instance'; import type { FieldSchema } from '@ember-data/store/-types/q/schema-service'; import type { StableRecordIdentifier } from '@warp-drive/core-types'; diff --git a/packages/serializer/src/-private/transforms/transform.ts b/packages/serializer/src/-private/transforms/transform.ts index fc416703a13..eea309b1323 100644 --- a/packages/serializer/src/-private/transforms/transform.ts +++ b/packages/serializer/src/-private/transforms/transform.ts @@ -3,7 +3,7 @@ */ import EmberObject from '@ember/object'; -import { AttributeSchema } from '@warp-drive/core-types/schema'; +import type { AttributeSchema } from '@warp-drive/core-types/schema'; /** The `Transform` class is used to serialize and deserialize model diff --git a/packages/serializer/src/index.ts b/packages/serializer/src/index.ts index b6df9d4e08b..4e80b8e3752 100644 --- a/packages/serializer/src/index.ts +++ b/packages/serializer/src/index.ts @@ -111,7 +111,7 @@ import EmberObject from '@ember/object'; import { inject as service } from '@ember/service'; import type Store from '@ember-data/store'; -import { ModelSchema } from '@ember-data/store/-types/q/ds-model'; +import type { ModelSchema } from '@ember-data/store/-types/q/ds-model'; /** > ⚠️ CAUTION you likely want the docs for [ Serializer](/ember-data/release/classes/%3CInterface%3E%20Serializer) diff --git a/packages/store/src/-private/cache-handler.ts b/packages/store/src/-private/cache-handler.ts index f892a1fdfb8..dce120129bf 100644 --- a/packages/store/src/-private/cache-handler.ts +++ b/packages/store/src/-private/cache-handler.ts @@ -2,14 +2,13 @@ import { assert } from '@ember/debug'; import type { Future, Handler, NextFn } from '@ember-data/request/-private/types'; import type { StableDocumentIdentifier } from '@warp-drive/core-types/identifier'; -import type { CreateRequestOptions, DeleteRequestOptions, UpdateRequestOptions } from '@warp-drive/core-types/request'; -import { - EnableHydration, - ImmutableRequestInfo, +import type { CreateRequestOptions, DeleteRequestOptions, ImmutableRequestInfo, RequestContext, - SkipCache, StructuredDataDocument, - StructuredErrorDocument, + StructuredErrorDocument,UpdateRequestOptions } from '@warp-drive/core-types/request'; +import { + EnableHydration, + SkipCache } from '@warp-drive/core-types/request'; import type { CollectionResourceDataDocument, diff --git a/packages/store/src/-private/caches/instance-cache.ts b/packages/store/src/-private/caches/instance-cache.ts index b76e9f8544d..50cfc59d39f 100644 --- a/packages/store/src/-private/caches/instance-cache.ts +++ b/packages/store/src/-private/caches/instance-cache.ts @@ -3,7 +3,7 @@ import { assert, warn } from '@ember/debug'; import { LOG_INSTANCE_CACHE } from '@ember-data/debugging'; import { DEBUG } from '@ember-data/env'; import type { RecordIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier'; -import { Value } from '@warp-drive/core-types/json/raw'; +import type { Value } from '@warp-drive/core-types/json/raw'; import type { RelationshipSchema } from '@warp-drive/core-types/schema'; import type { ExistingResourceIdentifierObject, NewResourceIdentifierObject } from '@warp-drive/core-types/spec/raw'; @@ -12,7 +12,7 @@ import type { JsonApiRelationship, JsonApiResource } from '../../-types/q/record import type { RecordInstance } from '../../-types/q/record-instance'; import RecordReference from '../legacy-model-support/record-reference'; import { CacheCapabilitiesManager } from '../managers/cache-capabilities-manager'; -import { CacheManager } from '../managers/cache-manager'; +import type { CacheManager } from '../managers/cache-manager'; import type { CreateRecordProperties } from '../store-service'; import type Store from '../store-service'; import { ensureStringId } from '../utils/coerce-id'; diff --git a/packages/store/src/-private/managers/cache-capabilities-manager.ts b/packages/store/src/-private/managers/cache-capabilities-manager.ts index 7f16ff6ce8d..5b52501d8eb 100644 --- a/packages/store/src/-private/managers/cache-capabilities-manager.ts +++ b/packages/store/src/-private/managers/cache-capabilities-manager.ts @@ -3,10 +3,11 @@ import { assert } from '@ember/debug'; import type { StableDocumentIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier'; import type { CacheCapabilitiesManager as StoreWrapper } from '../../-types/q/cache-store-wrapper'; -import { SchemaService } from '../../-types/q/schema-service'; -import { IdentifierCache, isDocumentIdentifier, isStableIdentifier } from '../caches/identifier-cache'; +import type { SchemaService } from '../../-types/q/schema-service'; +import type { IdentifierCache} from '../caches/identifier-cache'; +import { isDocumentIdentifier, isStableIdentifier } from '../caches/identifier-cache'; import type Store from '../store-service'; -import { NotificationType } from './notification-manager'; +import type { NotificationType } from './notification-manager'; /** @module @ember-data/store diff --git a/packages/store/src/-private/managers/record-array-manager.ts b/packages/store/src/-private/managers/record-array-manager.ts index f6fa804e954..b7c4481f668 100644 --- a/packages/store/src/-private/managers/record-array-manager.ts +++ b/packages/store/src/-private/managers/record-array-manager.ts @@ -3,19 +3,20 @@ */ import { addTransactionCB } from '@ember-data/tracking/-private'; import type { StableRecordIdentifier } from '@warp-drive/core-types/identifier'; -import { ImmutableRequestInfo } from '@warp-drive/core-types/request'; +import type { ImmutableRequestInfo } from '@warp-drive/core-types/request'; import type { CollectionResourceDocument } from '@warp-drive/core-types/spec/raw'; +import type { + CollectionCreateOptions} from '../record-arrays/identifier-array'; import IdentifierArray, { ARRAY_SIGNAL, Collection, - CollectionCreateOptions, NOTIFY, notifyArray, SOURCE, } from '../record-arrays/identifier-array'; import type Store from '../store-service'; -import { CacheOperation, UnsubscribeToken } from './notification-manager'; +import type { CacheOperation, UnsubscribeToken } from './notification-manager'; const FAKE_ARR = {}; const SLICE_BATCH_SIZE = 1200; diff --git a/packages/store/src/-private/network/request-cache.ts b/packages/store/src/-private/network/request-cache.ts index 298f17df110..9a5f1954b68 100644 --- a/packages/store/src/-private/network/request-cache.ts +++ b/packages/store/src/-private/network/request-cache.ts @@ -6,8 +6,8 @@ import { assert } from '@ember/debug'; import { DEBUG } from '@ember-data/env'; import type { StableRecordIdentifier } from '@warp-drive/core-types/identifier'; -import { FindOptions } from '../../-types/q/store'; -import Store from '../store-service'; +import type { FindOptions } from '../../-types/q/store'; +import type Store from '../store-service'; const Touching: unique symbol = Symbol('touching'); export const RequestPromise: unique symbol = Symbol('promise'); diff --git a/packages/store/src/-private/record-arrays/identifier-array.ts b/packages/store/src/-private/record-arrays/identifier-array.ts index 784ccfec28d..21989de6bd8 100644 --- a/packages/store/src/-private/record-arrays/identifier-array.ts +++ b/packages/store/src/-private/record-arrays/identifier-array.ts @@ -4,12 +4,13 @@ import { assert } from '@ember/debug'; import { compat } from '@ember-data/tracking'; +import type { + Signal} from '@ember-data/tracking/-private'; import { addToTransaction, createArrayTags, createSignal, defineSignal, - Signal, subscribe, } from '@ember-data/tracking/-private'; import type { StableRecordIdentifier } from '@warp-drive/core-types/identifier'; diff --git a/packages/store/src/-private/store-service.ts b/packages/store/src/-private/store-service.ts index 594eb1676f6..cca97c91819 100644 --- a/packages/store/src/-private/store-service.ts +++ b/packages/store/src/-private/store-service.ts @@ -27,11 +27,11 @@ import type { import type { Cache, CacheV1 } from '../-types/q/cache'; import type { CacheCapabilitiesManager } from '../-types/q/cache-store-wrapper'; -import { ModelSchema } from '../-types/q/ds-model'; +import type { ModelSchema } from '../-types/q/ds-model'; import type { RecordInstance } from '../-types/q/record-instance'; import type { SchemaService } from '../-types/q/schema-service'; import type { FindOptions, QueryOptions } from '../-types/q/store'; -import { type LifetimesService, StoreRequestContext, type StoreRequestInput } from './cache-handler'; +import type { LifetimesService, StoreRequestContext, StoreRequestInput } from './cache-handler'; import { IdentifierCache } from './caches/identifier-cache'; import { InstanceCache, @@ -41,14 +41,15 @@ import { resourceIsFullyDeleted, storeFor, } from './caches/instance-cache'; -import { Document } from './document'; +import type { Document } from './document'; import type RecordReference from './legacy-model-support/record-reference'; import { getShimClass } from './legacy-model-support/shim-model-class'; import { CacheManager } from './managers/cache-manager'; import NotificationManager from './managers/notification-manager'; import RecordArrayManager from './managers/record-array-manager'; import RequestStateService, { RequestPromise } from './network/request-cache'; -import IdentifierArray, { Collection } from './record-arrays/identifier-array'; +import type { Collection } from './record-arrays/identifier-array'; +import type IdentifierArray from './record-arrays/identifier-array'; import coerceId, { ensureStringId } from './utils/coerce-id'; import constructResource from './utils/construct-resource'; import normalizeModelName from './utils/normalize-model-name'; diff --git a/packages/store/src/-types/q/cache-store-wrapper.ts b/packages/store/src/-types/q/cache-store-wrapper.ts index 07ff453efac..5145ce4ee87 100644 --- a/packages/store/src/-types/q/cache-store-wrapper.ts +++ b/packages/store/src/-types/q/cache-store-wrapper.ts @@ -1,8 +1,8 @@ -import { StableDocumentIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier'; +import type { StableDocumentIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier'; -import { IdentifierCache } from '../../-private/caches/identifier-cache'; -import { NotificationType } from '../../-private/managers/notification-manager'; -import { SchemaService } from './schema-service'; +import type { IdentifierCache } from '../../-private/caches/identifier-cache'; +import type { NotificationType } from '../../-private/managers/notification-manager'; +import type { SchemaService } from './schema-service'; /** @module @ember-data/store diff --git a/packages/store/src/-types/q/cache.ts b/packages/store/src/-types/q/cache.ts index 08c69ac6520..40ad38c0513 100644 --- a/packages/store/src/-types/q/cache.ts +++ b/packages/store/src/-types/q/cache.ts @@ -61,4 +61,4 @@ export interface CacheV1 { isDeletionCommitted(identifier: StableRecordIdentifier): boolean; } -export { Cache }; +export type { Cache }; diff --git a/packages/store/src/-types/q/ds-model.ts b/packages/store/src/-types/q/ds-model.ts index c739217fa15..ca2405c024c 100644 --- a/packages/store/src/-types/q/ds-model.ts +++ b/packages/store/src/-types/q/ds-model.ts @@ -1,4 +1,4 @@ -import { AttributeSchema, RelationshipSchema } from '@warp-drive/core-types/schema'; +import type { AttributeSchema, RelationshipSchema } from '@warp-drive/core-types/schema'; type GenericRecord = Record; export interface ModelSchema { diff --git a/packages/store/src/-types/q/identifier.ts b/packages/store/src/-types/q/identifier.ts index 4ee8bc62113..c326d05d1cd 100644 --- a/packages/store/src/-types/q/identifier.ts +++ b/packages/store/src/-types/q/identifier.ts @@ -2,8 +2,8 @@ @module @ember-data/store */ -import { ImmutableRequestInfo } from '@ember-data/request'; -import { IdentifierBucket, StableIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier'; +import type { ImmutableRequestInfo } from '@ember-data/request'; +import type { IdentifierBucket, StableIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier'; import type { ExistingResourceObject, ResourceIdentifierObject } from '@warp-drive/core-types/spec/raw'; export type ResourceData = ResourceIdentifierObject | ExistingResourceObject; diff --git a/tests/warp-drive__schema-record/tests/-utils/normalize-payload.ts b/tests/warp-drive__schema-record/tests/-utils/normalize-payload.ts index b2766a2438b..537e1b55ba9 100644 --- a/tests/warp-drive__schema-record/tests/-utils/normalize-payload.ts +++ b/tests/warp-drive__schema-record/tests/-utils/normalize-payload.ts @@ -1,7 +1,7 @@ import type Owner from '@ember/owner'; import type Store from '@ember-data/store'; -import { Value } from '@warp-drive/core-types/json/raw'; +import type { Value } from '@warp-drive/core-types/json/raw'; import type { SingleResourceDocument } from '@warp-drive/core-types/spec/raw'; export function simplePayloadNormalize(owner: Owner, payload: SingleResourceDocument): SingleResourceDocument { diff --git a/tests/warp-drive__schema-record/tests/-utils/reactive-context.ts b/tests/warp-drive__schema-record/tests/-utils/reactive-context.ts index e0df0fb6e2c..a59c0a625ba 100644 --- a/tests/warp-drive__schema-record/tests/-utils/reactive-context.ts +++ b/tests/warp-drive__schema-record/tests/-utils/reactive-context.ts @@ -1,4 +1,5 @@ -import { render, TestContext } from '@ember/test-helpers'; +import type { TestContext } from '@ember/test-helpers'; +import { render } from '@ember/test-helpers'; import Component from '@glimmer/component'; import { hbs } from 'ember-cli-htmlbars'; diff --git a/tests/warp-drive__schema-record/tests/legacy/mode-test.ts b/tests/warp-drive__schema-record/tests/legacy/mode-test.ts index 2a3e7371855..938acf60053 100644 --- a/tests/warp-drive__schema-record/tests/legacy/mode-test.ts +++ b/tests/warp-drive__schema-record/tests/legacy/mode-test.ts @@ -11,7 +11,8 @@ import { withFields as withLegacyFields, } from '@ember-data/model/migration-support'; import RequestManager from '@ember-data/request'; -import Store, { CacheHandler } from '@ember-data/store'; +import type Store from '@ember-data/store'; +import { CacheHandler } from '@ember-data/store'; import { Editable, Legacy } from '@warp-drive/schema-record/record'; import { registerDerivations, SchemaService, withFields } from '@warp-drive/schema-record/schema'; diff --git a/tests/warp-drive__schema-record/tests/reactivity/derivation-test.ts b/tests/warp-drive__schema-record/tests/reactivity/derivation-test.ts index 77e308f280f..109667b9a17 100644 --- a/tests/warp-drive__schema-record/tests/reactivity/derivation-test.ts +++ b/tests/warp-drive__schema-record/tests/reactivity/derivation-test.ts @@ -5,8 +5,8 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import type Store from '@ember-data/store'; -import { FieldSchema } from '@ember-data/store/-types/q/schema-service'; -import { SchemaRecord } from '@warp-drive/schema-record/record'; +import type { FieldSchema } from '@ember-data/store/-types/q/schema-service'; +import type { SchemaRecord } from '@warp-drive/schema-record/record'; import { registerDerivations, SchemaService, withFields } from '@warp-drive/schema-record/schema'; import { reactiveContext } from '../-utils/reactive-context'; diff --git a/tests/warp-drive__schema-record/tests/reactivity/resource-test.ts b/tests/warp-drive__schema-record/tests/reactivity/resource-test.ts index b777a5ba86f..38284b30341 100644 --- a/tests/warp-drive__schema-record/tests/reactivity/resource-test.ts +++ b/tests/warp-drive__schema-record/tests/reactivity/resource-test.ts @@ -3,8 +3,8 @@ import { module, skip as test } from 'qunit'; import { setupTest } from 'ember-qunit'; import type Store from '@ember-data/store'; -import { Document } from '@ember-data/store/-private/document'; -import { SchemaRecord } from '@warp-drive/schema-record/record'; +import type { Document } from '@ember-data/store/-private/document'; +import type { SchemaRecord } from '@warp-drive/schema-record/record'; import { SchemaService } from '@warp-drive/schema-record/schema'; interface User { diff --git a/tests/warp-drive__schema-record/tests/reads/derivation-test.ts b/tests/warp-drive__schema-record/tests/reads/derivation-test.ts index 437442f559c..ee13b55a518 100644 --- a/tests/warp-drive__schema-record/tests/reads/derivation-test.ts +++ b/tests/warp-drive__schema-record/tests/reads/derivation-test.ts @@ -3,7 +3,7 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; import type Store from '@ember-data/store'; -import { SchemaRecord } from '@warp-drive/schema-record/record'; +import type { SchemaRecord } from '@warp-drive/schema-record/record'; import { registerDerivations, SchemaService, withFields } from '@warp-drive/schema-record/schema'; interface User { diff --git a/tests/warp-drive__schema-record/tests/reads/resource-test.ts b/tests/warp-drive__schema-record/tests/reads/resource-test.ts index a7a545cf745..806da2b542d 100644 --- a/tests/warp-drive__schema-record/tests/reads/resource-test.ts +++ b/tests/warp-drive__schema-record/tests/reads/resource-test.ts @@ -1,12 +1,12 @@ -import { TestContext } from '@ember/test-helpers'; +import type { TestContext } from '@ember/test-helpers'; import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; import type Store from '@ember-data/store'; -import { Document } from '@ember-data/store/-private/document'; -import { SchemaRecord } from '@warp-drive/schema-record/record'; +import type { Document } from '@ember-data/store/-private/document'; +import type { SchemaRecord } from '@warp-drive/schema-record/record'; import { registerDerivations, SchemaService, withFields } from '@warp-drive/schema-record/schema'; interface User {