Skip to content

Commit 260a44b

Browse files
committed
chore: add some type assertions
1 parent 76be39b commit 260a44b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/parts/icons.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const iconsPreset = defineUnimportPreset({
99
from: 'ionicons/icons',
1010
imports: Object.keys(icons).map(name => ({
1111
name,
12-
as: 'ionicons' + name[0].toUpperCase() + name.slice(1),
12+
as: 'ionicons' + name[0]!.toUpperCase() + name.slice(1),
1313
})),
1414
})
1515

src/runtime/composables/head.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function useHead<T extends Record<string, any>>(obj: UseHeadInput<T>, _?:
2929
const headArr = [...headMap.get(currentPath)!]
3030
const headArrIndex = headArr.findIndex(headVal => headVal[0] === innerObj)
3131
if (headArrIndex === -1) return
32-
const headToDispose = headArr[headArrIndex][1]
32+
const headToDispose = headArr[headArrIndex]![1]
3333
headToDispose?.dispose()
3434
headArr.splice(headArrIndex, 1)
3535
headMap.set(currentPath, headArr)
@@ -39,7 +39,7 @@ export function useHead<T extends Record<string, any>>(obj: UseHeadInput<T>, _?:
3939
const headArr = [...headMap.get(currentPath)!]
4040
const headArrIndex = headArr.findIndex(headVal => headVal[0] === innerObj)
4141
if (headArrIndex === -1) return
42-
const [, headToPatch] = headArr[headArrIndex]
42+
const [, headToPatch] = headArr[headArrIndex]!
4343
innerObj = newObj
4444
headToPatch?.patch(innerObj)
4545
headArr.splice(headArrIndex, 1, [innerObj, headToPatch])

0 commit comments

Comments
 (0)