You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*["TypeScript is complaining about multiple copies of the same types"](#typescript-is-complaining-about-multiple-copies-of-the-same-types)
@@ -371,7 +372,7 @@ node_modules/@types/ember-data/index.d.ts(920,56): error TS2344: Type 'any' does
371
372
372
373
This happens because the types for Ember's _test_ tooling includes the types for Ember Data because the `this` value in several of Ember's test types can include a reference to `DS.Store`.
373
374
374
-
**The fix:** add a declaration like this in your `types` directory:
375
+
**The fix:** add a declaration like this in a new file named `ember-data.d.ts` in your `types` directory:
375
376
376
377
```ts
377
378
declaremodule'ember-data' {
@@ -381,7 +382,9 @@ declare module 'ember-data' {
381
382
}
382
383
```
383
384
384
-
(If you're developing an addon and concerned that this might affect consumers, it won't. Your types directory will never be referenced by consumers at all!)
385
+
This works because (a) we include things in your types directory automatically and (b) TypeScript will merge this module and interface declaration with the main definitions for Ember Data from DefinitelyTyped behind the scenes.
386
+
387
+
If you're developing an addon and concerned that this might affect consumers, it won't. Your types directory will never be referenced by consumers at all!
385
388
386
389
### Type definitions outside `node_modules/@types`
0 commit comments