Skip to content

Commit

Permalink
chore: update types (#25538)
Browse files Browse the repository at this point in the history
* chore: update types

* rename prop
  • Loading branch information
lmiller1990 committed Jan 24, 2023
1 parent 8435cdc commit bba226c
Showing 1 changed file with 65 additions and 55 deletions.
120 changes: 65 additions & 55 deletions npm/vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const cleanup = () => {
* `MountOptions` are modifying, including some Cypress specific options like `styles`.
* The return type is different. Instead of VueWrapper, it's Cypress.Chainable<VueWrapper<...>>.
*/

type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps

type ComponentMountingOptions<T> = T extends DefineComponent<
Expand Down Expand Up @@ -206,46 +207,47 @@ export function mount<
> &
Record<string, any>
): Cypress.Chainable<{

wrapper: VueWrapper<
InstanceType<
DefineComponent<
PropsOrPropOptions,
RawBindings,
D,
C,
M,
Mixin,
Extends,
E,
EE,
PP,
Props,
Defaults
>
InstanceType<
DefineComponent<
PropsOrPropOptions,
RawBindings,
D,
C,
M,
Mixin,
Extends,
E,
EE,
PP,
Props,
Defaults
>
>
>
component: VueWrapper<
InstanceType<
DefineComponent<
PropsOrPropOptions,
RawBindings,
D,
C,
M,
Mixin,
Extends,
E,
EE,
PP,
Props,
Defaults
>
InstanceType<
DefineComponent<
PropsOrPropOptions,
RawBindings,
D,
C,
M,
Mixin,
Extends,
E,
EE,
PP,
Props,
Defaults
>
>['vm']}
>
>
>['vm']
}>

// component declared by vue-tsc ScriptSetup
export function mount<T extends DefineComponent<any, any, any, any>>(
export function mount<T extends DefineComponent<any, any, any, any, any>>(
component: T,
options?: ComponentMountingOptions<T>
): Cypress.Chainable<{
Expand Down Expand Up @@ -278,9 +280,17 @@ export function mount<
>,
options?: MountingOptions<Props & PublicProps, D>
): Cypress.Chainable<{
wrapper: VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>>
component: VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>>['vm']
}> & Record<string, any>
wrapper: VueWrapper<

ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>
> &
Record<string, any>
component: VueWrapper<

ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>
> &
Record<string, any>['vm']
}>

// Component declared with { props: [] }
export function mount<
Expand Down Expand Up @@ -343,27 +353,27 @@ export function mount<
options?: MountingOptions<ExtractPropTypes<PropsOptions> & PublicProps, D>
): Cypress.Chainable<{
wrapper: VueWrapper<
ComponentPublicInstance<
ExtractPropTypes<PropsOptions>,
RawBindings,
D,
C,
M,
E,
VNodeProps & ExtractPropTypes<PropsOptions>
>
ComponentPublicInstance<
ExtractPropTypes<PropsOptions>,
RawBindings,
D,
C,
M,
E,
VNodeProps & ExtractPropTypes<PropsOptions>
>
>
component: VueWrapper<
ComponentPublicInstance<
ExtractPropTypes<PropsOptions>,
RawBindings,
D,
C,
M,
E,
VNodeProps & ExtractPropTypes<PropsOptions>
>
>['vm']
ComponentPublicInstance<
ExtractPropTypes<PropsOptions>,
RawBindings,
D,
C,
M,
E,
VNodeProps & ExtractPropTypes<PropsOptions>
>
>['vm']
}>

/**
Expand Down

5 comments on commit bba226c

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on bba226c Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.0/linux-arm64/develop-bba226c0e6880fc8e217116b8e50f8d300959ada/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on bba226c Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.0/linux-x64/develop-bba226c0e6880fc8e217116b8e50f8d300959ada/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on bba226c Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.0/darwin-arm64/develop-bba226c0e6880fc8e217116b8e50f8d300959ada/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on bba226c Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.0/darwin-x64/develop-bba226c0e6880fc8e217116b8e50f8d300959ada/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on bba226c Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.0/win32-x64/develop-bba226c0e6880fc8e217116b8e50f8d300959ada/cypress.tgz

Please sign in to comment.