Last analyzed 3c5348f 4 months ago
Default analysis branch is
Currently analyzing run
Unnecessary type assertion of an expression JS-0349
Anti-pattern
4 months ago5 months old
This assertion is unnecessary since it does not change the type of the expression
 42    normal: () => (docs.switchToMode('normal').isInMotion = false),
 43    visual: () =>
 44      ((
 45        docs.switchToMode('normal').pressKey(keys['ArrowLeft']) as typeof docs 46      ).isInMotion = false),
 47    insert: () => (docs.switchToMode('normal').isInMotion = false),
 48    visualLine: () => (docs.switchToMode('normal').isInMotion = false)
This assertion is unnecessary since it does not change the type of the expression
174    clickingMenuItem: boolean = false,
175    addNewLine = false
176  ) {
177    const elSelector = document.querySelector(178      `[${type}="${selector}"]`179    ) as HTMLElement | null;180    if (!elSelector) return;
181
182    if (!clickingMenuItem)