Ver código fonte

fix(runtime-vapor): widen FunctionalVaporComponent props typing (#14470)

close #14467
edison 1 mês atrás
pai
commit
74645bb0fb

+ 2 - 2
packages/runtime-vapor/src/component.ts

@@ -127,7 +127,7 @@ import { isInteropEnabled } from './vdomInteropState'
 export { currentInstance } from '@vue/runtime-dom'
 
 export type VaporComponent =
-  | FunctionalVaporComponent
+  | FunctionalVaporComponent<any>
   | VaporComponentOptions
   | DefineVaporComponent
 
@@ -137,7 +137,7 @@ export type FunctionalVaporComponent<
   Slots extends StaticSlots = StaticSlots,
   Exposed extends Record<string, any> = Record<string, any>,
 > = ((
-  props: Readonly<Props & EmitsToProps<Emits>>,
+  props: Props & EmitsToProps<Emits>,
   ctx: {
     emit: EmitFn<Emits>
     slots: Slots

+ 1 - 0
packages/vue/jsx-runtime/index.d.ts

@@ -17,6 +17,7 @@ export namespace JSX {
   }
   export interface IntrinsicElements extends NativeElements {
     // allow arbitrary elements
+    // oxlint-disable-next-line typescript/prefer-ts-expect-error
     // @ts-ignore suppress ts:2374 = Duplicate string index signature.
     [name: string]: any
   }