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
- simplify readme type instruction
- drop redundant async in ajax.ts
- add credentials to FetchOptions type
- add FetchAdapter interface for our object literal and better support
Mixin.create typing
To use `ember-fetch` with TypeScript or enable editor's type support, add `"fetch": "ember-cli/ember-fetch"` to your app's `devDependencies`.
40
-
This will get the current state of `ember-fetch` from this GitHub repo as a dependency.
41
-
42
-
You can also add `"fetch": ["node_modules/ember-fetch"]` to your `tsconfig.json`.
39
+
To use `ember-fetch` with TypeScript or enable editor's type support, You can add `"fetch": ["node_modules/ember-fetch"]` to your `tsconfig.json`.
40
+
41
+
```json
42
+
{
43
+
"compilerOptions": {
44
+
"paths": {
45
+
"fetch": [
46
+
"node_modules/ember-fetch"
47
+
]
48
+
}
49
+
}
50
+
}
51
+
```
43
52
44
53
### Use with Ember Data
45
54
To have Ember Data utilize `fetch` instead of jQuery.ajax to make calls to your backend, extend your project's `application` adapter with the `adapter-fetch` mixin.
@@ -112,7 +121,8 @@ The way you do import remains same.
112
121
113
122
## Q & A
114
123
### Does it work with pretender?
115
-
Yes, [pretender v2.1](https://github.com/pretenderjs/pretender/tree/v2.1.0) comes with `fetch` support.
124
+
125
+
* Yes, [pretender v2.1](https://github.com/pretenderjs/pretender/tree/v2.1.0) comes with `fetch` support.
0 commit comments