Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Oct 21, 2023
1 parent 30dd076 commit 6f0042e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/dts-test/componentTypeExtensions.test-d.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ declare module 'vue' {
interface ComponentCustomOptions {
test?(n: number): void
}

interface GlobalDirectives {
test: Directive
}
Expand Down
12 changes: 9 additions & 3 deletions packages/dts-test/defineComponent.test-d.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1497,12 +1497,18 @@ describe('expose component types', () => {
expectType<Component>(parent.components!.child2)

// global components
expectType<Readonly<KeepAliveProps>>(new parent.components!.KeepAlive().$props)
expectType<Readonly<KeepAliveProps>>(
new parent.components!.KeepAlive().$props
)
expectType<Readonly<KeepAliveProps>>(new child.components!.KeepAlive().$props)

// runtime-dom components
expectType<Readonly<TransitionProps>>(new parent.components!.Transition().$props)
expectType<Readonly<TransitionProps>>(new child.components!.Transition().$props)
expectType<Readonly<TransitionProps>>(
new parent.components!.Transition().$props
)
expectType<Readonly<TransitionProps>>(
new child.components!.Transition().$props
)
})

describe('directive typing', () => {
Expand Down
20 changes: 11 additions & 9 deletions packages/runtime-core/src/componentPublicInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin
: false
: false

// TODO-CR check this
// TODO-CR check this
type MixinToOptionTypes<T> = T extends ComponentOptionsBase<
infer P,
infer B,
Expand Down Expand Up @@ -247,14 +247,16 @@ export type ComponentPublicInstance<
: (...args: any) => any,
options?: WatchOptions
): WatchStopHandle
} & ExposedKeys<P &
ShallowUnwrapRef<B> &
UnwrapNestedRefs<D> &
ExtractComputedReturns<C> &
M &
ComponentCustomProperties &
InjectToObject<I>,
Exposed>
} & ExposedKeys<
P &
ShallowUnwrapRef<B> &
UnwrapNestedRefs<D> &
ExtractComputedReturns<C> &
M &
ComponentCustomProperties &
InjectToObject<I>,
Exposed
>

export type PublicPropertiesMap = Record<
string,
Expand Down

0 comments on commit 6f0042e

Please sign in to comment.