chore: stop re-exporting isVNode (#19108)

This commit is contained in:
dopamine 2024-12-05 10:30:00 +08:00 committed by GitHub
parent 718ffcfb85
commit f4d3547fa5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 5 additions and 15 deletions

View File

@ -1,4 +1,4 @@
import { createVNode, render } from 'vue'
import { createVNode, isVNode, render } from 'vue'
import {
debugWarn,
hasOwn,
@ -8,7 +8,6 @@ import {
isObject,
isString,
isUndefined,
isVNode,
} from '@element-plus/utils'
import MessageBoxConstructor from './index.vue'

View File

@ -1,4 +1,4 @@
import { createVNode, render } from 'vue'
import { createVNode, isVNode, render } from 'vue'
import {
debugWarn,
isBoolean,
@ -7,7 +7,6 @@ import {
isFunction,
isNumber,
isString,
isVNode,
} from '@element-plus/utils'
import { messageConfig } from '@element-plus/components/config-provider'
import MessageConstructor from './message.vue'

View File

@ -1,4 +1,4 @@
import { createVNode, render } from 'vue'
import { createVNode, isVNode, render } from 'vue'
import {
debugWarn,
isClient,
@ -6,7 +6,6 @@ import {
isFunction,
isString,
isUndefined,
isVNode,
} from '@element-plus/utils'
import NotificationConstructor from './notification.vue'
import { notificationTypes } from './notification'

View File

@ -1,5 +1,5 @@
import { shallowRef } from 'vue'
import { flattedChildren, isVNode } from '@element-plus/utils'
import { isVNode, shallowRef } from 'vue'
import { flattedChildren } from '@element-plus/utils'
import type { ComponentInternalInstance, VNode } from 'vue'

View File

@ -1,4 +1,3 @@
import * as vue from 'vue'
import * as vueShared from '@vue/shared'
import { describe, expect, it } from 'vitest'
import {
@ -15,7 +14,6 @@ import {
isString,
isSymbol,
isUndefined,
isVNode,
} from '..'
describe('types', () => {
@ -29,10 +27,6 @@ describe('types', () => {
expect(isSymbol).toBe(vueShared.isSymbol)
})
it('re-export from vue', () => {
expect(isVNode).toBe(vue.isVNode)
})
it('isBoolean and isNumber should work', () => {
expect(isBoolean(true)).toBe(true)
expect(isBoolean(false)).toBe(true)

View File

@ -11,7 +11,6 @@ export {
isSymbol,
isPlainObject,
} from '@vue/shared'
export { isVNode } from 'vue'
export const isUndefined = (val: any): val is undefined => val === undefined
export const isBoolean = (val: any): val is boolean => typeof val === 'boolean'