Skip to content

Commit

Permalink
more as any to prevent assigning in body of constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Nov 10, 2020
1 parent 4682a31 commit c61644a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/adapter/addon/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ type Snapshot = import('@ember-data/store/-private/system/snapshot').default;
*/
class RESTAdapter extends Adapter.extend(BuildURLMixin) {
_fastboot: FastBoot | undefined;
_najaxRequest: Function;

defaultSerializer = '-rest';

Expand All @@ -313,7 +312,7 @@ class RESTAdapter extends Adapter.extend(BuildURLMixin) {
return (this._fastboot = getOwner(this).lookup('service:fastboot'));
}

set fastboot(value) {
set fastboot(value: FastBoot) {
this._fastboot = value;
}

Expand Down Expand Up @@ -1056,7 +1055,7 @@ class RESTAdapter extends Adapter.extend(BuildURLMixin) {
if ((this as any).useFetch) {
this._fetchRequest(options);
} else if (DEPRECATE_NAJAX && this.fastboot && this.fastboot.isFastBoot) {
this._najaxRequest(options);
(this as any).najaxRequest(options);
} else {
this._ajaxRequest(options);
}
Expand Down Expand Up @@ -1411,7 +1410,7 @@ if (DEPRECATE_NAJAX) {
@private
@param {Object} options jQuery ajax options to be used for the najax request
*/
RESTAdapter.prototype._najaxRequest = function(options) {
(RESTAdapter.prototype as any)._najaxRequest = function(options) {
if (typeof najax !== 'undefined') {
najax(options);
} else {
Expand Down

0 comments on commit c61644a

Please sign in to comment.