Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 15, 2022
1 parent 5bc016a commit 330e996
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/vite/src/plugins/composable-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export const composableKeysPlugin = createUnplugin((options: ComposableKeysOptio
sourceType: 'module',
ecmaVersion: 'latest'
}), {
// @ts-expect-error type cast
enter (node: CallExpression) {
if (node.type !== 'CallExpression' || node.callee.type !== 'Identifier') { return }
if (keyedFunctions.includes(node.callee.name) && node.arguments.length < 4) {
enter (_node) {
if (_node.type !== 'CallExpression' || (_node as CallExpression).callee.type !== 'Identifier') { return }
const node: CallExpression = _node as CallExpression
if (keyedFunctions.includes((node.callee as any).name) && node.arguments.length < 4) {
const end = (node as any).end
s.appendLeft(
codeIndex + end - 1,
Expand Down

0 comments on commit 330e996

Please sign in to comment.