Skip to content

Commit b40c9db

Browse files
committed
Migrate to TypeScript 6
1 parent 29a6e24 commit b40c9db

13 files changed

Lines changed: 76 additions & 24 deletions

.pnp.cjs

Lines changed: 17 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:76d54e74337fa7e24041b747019116c410ace3b707cb2c53dd03759904cdadff
3+
size 4598427
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:1af8cbfc5b84fcf3f8360f346b53f09190ad18a673737cda61641bea10e54723
3+
size 4602371

.yarn/sdks/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript",
3-
"version": "5.6.3-sdk",
3+
"version": "6.0.3-sdk",
44
"main": "./lib/typescript.js",
55
"type": "commonjs",
66
"bin": {

app.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ declare module '*.graphql' {
55
export = value;
66
}
77

8+
declare module '*.css';
89
declare module '*.svg';

i18next.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Narrow react-i18next's `t()` return type to `string`. Without this,
2+
// TFunction's TDefaultResult widens to `TFunctionResult | ReactNode`,
3+
// which doesn't satisfy MUI props like `aria-label: string | undefined`.
4+
//
5+
// Remove this file once i18next is upgraded to v22+ and react-i18next to v12+,
6+
// where `t()` returns `string` by default and this workaround is unnecessary.
7+
import 'react-i18next';
8+
9+
declare module 'react-i18next' {
10+
interface Resources {
11+
translation: Record<string, string>;
12+
}
13+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
"prettier": "^3.6.2",
142142
"puppeteer": "24.4.0",
143143
"ts-essentials": "^9.3.0",
144-
"typescript": "~5.6.3",
144+
"typescript": "~6.0.0",
145145
"url-loader": "^4.1.1",
146146
"webpack": "^5.96.1"
147147
},

pages/api/auth/[...nextauth].page.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { NextApiRequest, NextApiResponse } from 'next';
22
import NextAuth, { NextAuthOptions } from 'next-auth';
3-
import { Provider } from 'next-auth/providers';
43
import OktaProvider from 'next-auth/providers/okta';
54
import rollbar, { isRollBarEnabled } from 'pages/api/utils/rollBar';
65
import {
@@ -95,7 +94,7 @@ if (
9594
);
9695
}
9796

98-
const providersArray: Provider[] = [];
97+
const providersArray: NextAuthOptions['providers'] = [];
9998

10099
if (AUTH_PROVIDER === 'OKTA') {
101100
providersArray.push(

pages/api/uploads/csv-upload.page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const uploadFile = async (
5454
}
5555

5656
const csvFile = new File(
57-
[await readFile(file.filepath)],
57+
[new Uint8Array(await readFile(file.filepath))],
5858
file.originalFilename ?? 'csvFile',
5959
);
6060

pages/api/uploads/upload-person-avatar.page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const uploadPersonAvatar = async (
5959

6060
const pictureId = crypto.randomUUID();
6161
const file = new File(
62-
[await readFile(avatar.filepath)],
62+
[new Uint8Array(await readFile(avatar.filepath))],
6363
avatar.originalFilename ?? 'avatar',
6464
);
6565

0 commit comments

Comments
 (0)