Skip to content

Commit 016bc57

Browse files
committed
Fix small typescript issues
Small changes after updating to TS v5 es5 > ES2018 target change so tat we can use named groups in regexps (in frontend/js/src/utils/utils.tsx) without triggering an error (was previously a warning)
1 parent ff93843 commit 016bc57

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Diff for: frontend/js/tests/common/brainzplayer/BrainzPlayer.test.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ describe("BrainzPlayer", () => {
121121
});
122122
});
123123
beforeAll(() => {
124-
window.location = {
125-
href: "http://nevergonnagiveyouup.com",
126-
} as Window["location"];
124+
window.location.href = "http://nevergonnagiveyouup.com";
127125

128126
global.IntersectionObserver = IntersectionObserver;
129127
window.HTMLElement.prototype.scrollIntoView = jest.fn();

Diff for: tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"outDir": "./dist/",
55
"noImplicitAny": true,
66
"module": "es2022",
7-
"target": "es5",
7+
"target": "ES2018",
88
"jsx": "react",
99
"strict": true,
1010
"moduleResolution": "node",

0 commit comments

Comments
 (0)