Skip to content

Commit bf872cb

Browse files
committed
refactor: remove unnecessary type assertions
1 parent e334670 commit bf872cb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/document/selection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function setUISelection(
101101
const anchorOffset =
102102
mode === 'replace' || element[UISelection] === undefined
103103
? sanitizeOffset(anchorOffsetParam)
104-
: (element[UISelection] as UISelection).anchorOffset
104+
: element[UISelection].anchorOffset
105105
const focusOffset = sanitizeOffset(focusOffsetParam)
106106

107107
const startOffset = Math.min(anchorOffset, focusOffset)

src/utils/misc/level.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ declare module '../../setup' {
1717

1818
export function setLevelRef(config: Config, level: ApiLevel) {
1919
config[Level] ??= {}
20-
;(config[Level] as LevelRefs)[level] = {}
20+
config[Level][level] = {}
2121
}
2222

2323
export function getLevelRef(config: Config, level: ApiLevel) {

0 commit comments

Comments
 (0)