diff --git a/package.json b/package.json index ff4834349..5e7ace9c0 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "jsdom": "27.2.0", "jsdom-global": "3.0.2", "lint-staged": "16.2.7", - "prettier": "3.6.2", + "prettier": "3.7.4", "reflect-metadata": "0.2.2", "rollup": "4.53.3", "tslib": "2.8.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3055d77c..1833be943 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,7 +68,7 @@ importers: version: 10.1.8(eslint@9.39.1) eslint-plugin-prettier: specifier: 5.5.4 - version: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1))(eslint@9.39.1)(prettier@3.6.2) + version: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1))(eslint@9.39.1)(prettier@3.7.4) husky: specifier: 9.1.7 version: 9.1.7 @@ -82,8 +82,8 @@ importers: specifier: 16.2.7 version: 16.2.7 prettier: - specifier: 3.6.2 - version: 3.6.2 + specifier: 3.7.4 + version: 3.7.4 reflect-metadata: specifier: 0.2.2 version: 0.2.2 @@ -2099,8 +2099,8 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier@3.6.2: - resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} + prettier@3.7.4: + resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} engines: {node: '>=14'} hasBin: true @@ -4048,10 +4048,10 @@ snapshots: dependencies: eslint: 9.39.1 - eslint-plugin-prettier@5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1))(eslint@9.39.1)(prettier@3.6.2): + eslint-plugin-prettier@5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1))(eslint@9.39.1)(prettier@3.7.4): dependencies: eslint: 9.39.1 - prettier: 3.6.2 + prettier: 3.7.4 prettier-linter-helpers: 1.0.0 synckit: 0.11.8 optionalDependencies: @@ -4626,7 +4626,7 @@ snapshots: dependencies: fast-diff: 1.2.0 - prettier@3.6.2: {} + prettier@3.7.4: {} property-information@6.5.0: {} diff --git a/src/baseWrapper.ts b/src/baseWrapper.ts index f2f514122..ce4a3e326 100644 --- a/src/baseWrapper.ts +++ b/src/baseWrapper.ts @@ -33,9 +33,9 @@ import { stringifyNode } from './utils/stringifyNode' import type { HTMLBeautifyOptions } from 'js-beautify' import beautify from 'js-beautify' -export default abstract class BaseWrapper - implements WrapperLike -{ +export default abstract class BaseWrapper< + ElementType extends Node +> implements WrapperLike { protected readonly wrapperElement: VueNode protected abstract getRootNodes(): VueNode[] diff --git a/src/types.ts b/src/types.ts index 7d90431ea..354ea0982 100644 --- a/src/types.ts +++ b/src/types.ts @@ -86,8 +86,10 @@ interface BaseMountingOptions { /** * Mounting options for `mount` and `shallowMount` */ -export interface MountingOptions - extends BaseMountingOptions { +export interface MountingOptions extends BaseMountingOptions< + Props, + Data +> { /** * Specify where to mount the component. * Can be a valid CSS selector, or an Element connected to the document. @@ -99,8 +101,10 @@ export interface MountingOptions /** * Mounting options for `renderToString` */ -export interface RenderMountingOptions - extends BaseMountingOptions { +export interface RenderMountingOptions< + Props, + Data = {} +> extends BaseMountingOptions { /** * Attach to is not available in SSR mode */ diff --git a/src/utils.ts b/src/utils.ts index 43f6fbd27..c719e48f3 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -133,7 +133,7 @@ export function isComponent( ): component is ConcreteComponent { return Boolean( component && - (typeof component === 'object' || typeof component === 'function') + (typeof component === 'object' || typeof component === 'function') ) } diff --git a/src/utils/vueCompatSupport.ts b/src/utils/vueCompatSupport.ts index 839d861ee..4e83f5341 100644 --- a/src/utils/vueCompatSupport.ts +++ b/src/utils/vueCompatSupport.ts @@ -32,8 +32,8 @@ export function unwrapLegacyVueExtendComponent( export function isLegacyFunctionalComponent(component: unknown): boolean { return Boolean( component && - typeof component === 'object' && - hasOwnProperty(component, 'functional') && - component.functional + typeof component === 'object' && + hasOwnProperty(component, 'functional') && + component.functional ) }