Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
fix: bump typescript to get working d.ts
Browse files Browse the repository at this point in the history
fixes #388
  • Loading branch information
makepanic authored and alexlafroscia committed Oct 9, 2018
1 parent 196b10f commit 975724d
Show file tree
Hide file tree
Showing 5 changed files with 1,636 additions and 69 deletions.
2 changes: 1 addition & 1 deletion addon/mixins/ajax-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ export default Mixin.create({
*/
_getFullHeadersHash(headers?: Headers): Headers {
const classHeaders = get(this, 'headers');
return assign({}, classHeaders, headers);
return assign({}, classHeaders!, headers!);
},

/**
Expand Down
27 changes: 16 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@
"@commitlint/config-conventional": "^7.0.1",
"@commitlint/travis-cli": "^7.0.0",
"@types/chai": "^4.1.4",
"@types/ember": "^2.8.28",
"@types/ember-data": "^2.14.17",
"@types/ember-mocha": "^0.12.3",
"@types/ember-test-helpers": "^0.7.1",
"@types/ember": "^3.0.24",
"@types/ember-data": "^3.1.1",
"@types/ember-mocha": "^0.14.4",
"@types/ember-test-helpers": "^1.0.3",
"@types/ember-testing-helpers": "^0.0.3",
"@types/mocha": "^5.2.3",
"@types/ember__test-helpers": "^0.7.5",
"@types/mocha": "^5.2.5",
"@types/node": "^10.3.3",
"@types/rsvp": "^4.0.2",
"broccoli-asset-rev": "^2.7.0",
Expand All @@ -70,7 +71,7 @@
"ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^2.1.0",
"ember-cli-testdouble": "^0.1.3",
"ember-cli-typescript": "^1.3.2",
"ember-cli-typescript": "^1.4.3",
"ember-cli-uglify": "^2.1.0",
"ember-data": "^3.1.1",
"ember-export-application-global": "2.0.0",
Expand All @@ -94,13 +95,17 @@
"prettier": "^1.13.5",
"testdouble": "^3.8.1",
"testdouble-chai": "^0.5.0",
"typescript": "^2.9.2",
"typescript-eslint-parser": "^16.0.1"
"typescript": "^3.1.1",
"typescript-eslint-parser": "^19.0.2"
},
"resolutions": {
"@types/ember": "2.8.28",
"@types/mocha": "5.2.3",
"@types/rsvp": "4.0.2"
"@types/ember__error": "3.0.2",
"@types/ember-mocha": "0.14.4",
"@types/ember-test-helpers": "1.0.3",
"@types/ember-testing-helpers": "0.0.3",
"@types/ember__test-helpers": "0.7.5",
"@types/mocha": "^5.2.5",
"@types/jquery": "^3.3.10"
},
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
Expand Down
16 changes: 12 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,23 @@
"ember-ajax/*": [
"addon/*"
],
"ember-ajax/test-support": [
"addon-test-support"
],
"ember-ajax/test-support/*": [
"addon-test-support/*"
],
"*": [
"types/*"
]
}
},
"include": [
"app",
"addon",
"tests",
"types"
"app/**/*",
"addon/**/*",
"tests/**/*",
"types/**/*",
"test-support/**/*",
"addon-test-support/**/*"
]
}
8 changes: 3 additions & 5 deletions types/ember-data.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/**
* Catch-all for ember-data.
*/
declare module 'ember-data' {
interface ModelRegistry {
// see https://github.com/typed-ember/ember-cli-typescript#fixing-the-ember-data-error-ts2344-problem
declare module 'ember-data/types/registries/model' {
export default interface ModelRegistry {
[key: string]: any;
}
}
Loading

0 comments on commit 975724d

Please sign in to comment.