Skip to content

Commit ae1e533

Browse files
committed
chore: updates to TS v5 to remove linter errors
1 parent 0400141 commit ae1e533

6 files changed

+14
-15
lines changed

addon/types.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ export type Nullable<T> = T | null | undefined;
44

55
export type PlainObject<T = string | number | boolean> = {
66
[key: string]: T | PlainObject<T> | PlainObject<T>[] | undefined | null;
7-
}
7+
};
88

99
export type PlainHeaders = {
1010
[key: string]: string;
11-
}
11+
};
1212

1313
export type Method =
1414
| 'HEAD'
@@ -30,7 +30,7 @@ export type Credentials = 'omit' | 'same-origin' | 'include';
3030

3131
export type FetchOptions = Mix<
3232
AjaxOptions,
33-
{ body?: BodyInit | null; method?: Method, credentials: Credentials }
33+
{ body?: BodyInit | null; method?: Method; credentials: Credentials }
3434
>;
3535

3636
export function isPlainObject(obj: any): obj is PlainObject {

addon/utils/determine-body-promise.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function determineBodyPromise(
99
response: Response,
1010
requestData: JQueryAjaxSettings
1111
): Promise<object | string | undefined> {
12-
return response.text().then(function(payload) {
12+
return response.text().then(function (payload) {
1313
let ret: string | object | undefined = payload;
1414
try {
1515
ret = JSON.parse(payload);

addon/utils/mung-options-for-fetch.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
Method,
44
FetchOptions,
55
AjaxOptions,
6-
isPlainObject
6+
isPlainObject,
77
} from 'ember-fetch/types';
88

99
/**
@@ -12,9 +12,10 @@ import {
1212
export default function mungOptionsForFetch(
1313
options: AjaxOptions
1414
): FetchOptions {
15-
const hash = Object.assign({},
15+
const hash = Object.assign(
16+
{},
1617
{
17-
credentials: 'same-origin'
18+
credentials: 'same-origin',
1819
},
1920
options
2021
) as FetchOptions;

addon/utils/serialize-query-params.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ export function serializeQueryParams(
4545
return s;
4646
}
4747

48-
return buildParams('', queryParamsObject)
49-
.join('&')
50-
.replace(/%20/g, '+');
48+
return buildParams('', queryParamsObject).join('&').replace(/%20/g, '+');
5149
}
5250

5351
/**

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"stylelint": "^15.4.0",
106106
"stylelint-config-standard": "^32.0.0",
107107
"stylelint-prettier": "^3.0.0",
108-
"typescript": "^4.1.3",
108+
"typescript": "^5.0.0",
109109
"webpack": "^5.78.0"
110110
},
111111
"peerDependencies": {

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -13918,10 +13918,10 @@ typescript-memoize@^1.0.1:
1391813918
resolved "https://registry.yarnpkg.com/typescript-memoize/-/typescript-memoize-1.1.1.tgz#02737495d5df6ebf72c07ba0d002e8f4cf5ccfa0"
1391913919
integrity sha512-GQ90TcKpIH4XxYTI2F98yEQYZgjNMOGPpOgdjIBhaLaWji5HPWlRnZ4AeA1hfBxtY7bCGDJsqDDHk/KaHOl5bA==
1392013920

13921-
typescript@^4.1.3:
13922-
version "4.1.3"
13923-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
13924-
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==
13921+
typescript@^5.0.0:
13922+
version "5.2.2"
13923+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
13924+
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==
1392513925

1392613926
uc.micro@^1.0.1, uc.micro@^1.0.5:
1392713927
version "1.0.6"

0 commit comments

Comments
 (0)