Skip to content

Commit c9a37bb

Browse files
committed
refactor(types): reuse IsAny from shared module
1 parent 2b0ef54 commit c9a37bb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/dts-test/component.test-d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import {
1111
ref,
1212
toRefs,
1313
} from 'vue'
14-
import { type IsAny, describe, expectAssignable, expectType } from './utils'
14+
import type { IsAny } from '@vue/shared'
15+
import { describe, expectAssignable, expectType } from './utils'
1516

1617
declare function extractComponentOptions<
1718
Props,

packages/dts-test/ref.test-d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import {
1818
toValue,
1919
unref,
2020
} from 'vue'
21-
import { type IsAny, type IsUnion, describe, expectType } from './utils'
21+
import type { IsAny } from '@vue/shared'
22+
import { type IsUnion, describe, expectType } from './utils'
2223

2324
function plainType(arg: number | Ref<number>) {
2425
// ref coercing

packages/dts-test/utils.d.ts

-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,4 @@ export type IsUnion<T, U extends T = T> = (
1616
? false
1717
: true
1818

19-
export type IsAny<T> = 0 extends 1 & T ? true : false
20-
2119
export type Prettify<T> = { [K in keyof T]: T[K] } & {}

0 commit comments

Comments
 (0)