Skip to content

Latest commit

 

History

History
73 lines (61 loc) · 2.46 KB

1-configuration.md

File metadata and controls

73 lines (61 loc) · 2.46 KB

Configuration

There are currently two ways to gain access to EmberData's native types. Follow the configuration guide below for the installation option you chose.

  1. Use A Version That Has Types

  2. Use Official Types Packages with releases >= 4.12.*

Important

EmberData's Native Types require the use of Ember's Native Types, the configuration below will also setup Your application to consume Ember's Native Types.

Using Native Types

To consume alpha stage types, you must import the types in your project's tsconfig.json.

For alpha stage types, we add unstable-preview-types to the path to help you remember the potential volatility.

 {
   "compilerOptions": {
+   "types": [
+      "ember-source/types",
+      "ember-data/unstable-preview-types",
+      "@ember-data/store/unstable-preview-types",
+      "@ember-data/adapter/unstable-preview-types",
+      "@ember-data/graph/unstable-preview-types",
+      "@ember-data/json-api/unstable-preview-types",
+      "@ember-data/legacy-compat/unstable-preview-types",
+      "@ember-data/request/unstable-preview-types",
+      "@ember-data/request-utils/unstable-preview-types",
+      "@ember-data/model/unstable-preview-types",
+      "@ember-data/serializer/unstable-preview-types",
+      "@ember-data/tracking/unstable-preview-types",
+      "@warp-drive/core-types/unstable-preview-types"
+    ]
   }
 }

Using Types Packages

To consume alpha stage types, you must import the types in your project's tsconfig.json.

For alpha stage types, we add unstable-preview-types to the path to help you remember the potential volatility.

 {
   "compilerOptions": {
+   "types": [
+      "ember-source/types",
+      "ember-data-types/unstable-preview-types",
+      "@ember-data-types/store/unstable-preview-types",
+      "@ember-data-types/adapter/unstable-preview-types",
+      "@ember-data-types/graph/unstable-preview-types",
+      "@ember-data-types/json-api/unstable-preview-types",
+      "@ember-data-types/legacy-compat/unstable-preview-types",
+      "@ember-data-types/request/unstable-preview-types",
+      "@ember-data-types/request-utils/unstable-preview-types",
+      "@ember-data-types/model/unstable-preview-types",
+      "@ember-data-types/serializer/unstable-preview-types",
+      "@ember-data-types/tracking/unstable-preview-types",
+      "@warp-drive-types/core-types/unstable-preview-types"
+    ]
   }
 }