chore: avoid toHandlers not treeshaken

This commit is contained in:
Evan You 2024-12-02 21:00:52 +08:00
parent f3b90706ef
commit 0986051f12
No known key found for this signature in database
GPG Key ID: 00E9AB7A6704CE0A
1 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,8 @@ import { toHandlers as _toHandlers } from '@vue/runtime-shared'
import { warn } from '../warning'
import { NOOP } from '@vue/shared'
export const toHandlers: (
export const toHandlers = (
obj: Record<string, any>,
preserveCaseIfNecessary?: boolean | undefined,
) => Record<string, any> = _toHandlers.bind(undefined, __DEV__ ? warn : NOOP)
): Record<string, any> =>
_toHandlers(__DEV__ ? warn : NOOP, obj, preserveCaseIfNecessary)