Skip to content

Commit 0b011ec

Browse files
committed
fix: convert normalize case file to typescript to make the build not take 4 minutes
1 parent 578bfde commit 0b011ec

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

packages/config/src/case.js renamed to packages/config/src/case.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
// Some properties can be optionally capitalized. We normalize them to lowercase
2-
export const normalizeConfigCase = function ({ Build, build = Build, ...config }) {
2+
export const normalizeConfigCase = function ({
3+
Build,
4+
build = Build,
5+
...config
6+
}: {
7+
Build: Record<string, unknown>
8+
build: Record<string, unknown>
9+
[key: string]: unknown
10+
}): Record<string, unknown> {
311
const buildA = normalizeBuildCase(build)
412
return { ...config, build: buildA }
513
}
614

7-
const normalizeBuildCase = function ({
15+
const normalizeBuildCase = ({
816
Base,
917
base = Base,
1018
Command,
@@ -22,7 +30,7 @@ const normalizeBuildCase = function ({
2230
Publish,
2331
publish = Publish,
2432
...build
25-
} = {}) {
33+
}: Record<string, unknown> = {}): Record<string, unknown> => {
2634
return {
2735
...build,
2836
base,

0 commit comments

Comments
 (0)