]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: run prettier
authorEvan You <yyx990803@gmail.com>
Tue, 8 Nov 2022 06:25:48 +0000 (14:25 +0800)
committerEvan You <yyx990803@gmail.com>
Tue, 8 Nov 2022 06:25:48 +0000 (14:25 +0800)
packages/runtime-core/src/apiDefineComponent.ts
packages/runtime-core/src/componentOptions.ts
packages/runtime-core/src/componentPublicInstance.ts

index 10f4f69acab6989723b73a88fa1f6783596f01be..c10ac74e4a96304462f3587e76da819b6c179343 100644 (file)
@@ -138,7 +138,7 @@ export function defineComponent<
   E extends EmitsOptions = {},
   EE extends string = string,
   I extends ComponentInjectOptions = {},
-  II extends string = string,
+  II extends string = string
 >(
   options: ComponentOptionsWithArrayProps<
     PropNames,
@@ -180,7 +180,7 @@ export function defineComponent<
   E extends EmitsOptions = {},
   EE extends string = string,
   I extends ComponentInjectOptions = {},
-  II extends string = string,
+  II extends string = string
 >(
   options: ComponentOptionsWithObjectProps<
     PropsOptions,
index 5275a747db9352a0b79d73ea1e4ce1491bd81009..ea70d41a904ed69d7c68c24a8b8988bc75343d09 100644 (file)
@@ -229,7 +229,7 @@ export type ComponentOptionsWithoutProps<
   EE extends string = string,
   I extends ComponentInjectOptions = {},
   II extends string = string,
-  PE = Props & EmitsToProps<E>,
+  PE = Props & EmitsToProps<E>
 > = ComponentOptionsBase<
   PE,
   RawBindings,
@@ -246,7 +246,20 @@ export type ComponentOptionsWithoutProps<
 > & {
   props?: undefined
 } & ThisType<
-    CreateComponentPublicInstance<PE, RawBindings, D, C, M, Mixin, Extends, E, PE, {}, false, I>
+    CreateComponentPublicInstance<
+      PE,
+      RawBindings,
+      D,
+      C,
+      M,
+      Mixin,
+      Extends,
+      E,
+      PE,
+      {},
+      false,
+      I
+    >
   >
 
 export type ComponentOptionsWithArrayProps<
@@ -307,7 +320,7 @@ export type ComponentOptionsWithObjectProps<
   I extends ComponentInjectOptions = {},
   II extends string = string,
   Props = Readonly<ExtractPropTypes<PropsOptions>> & EmitsToProps<E>,
-  Defaults = ExtractDefaultPropTypes<PropsOptions>,
+  Defaults = ExtractDefaultPropTypes<PropsOptions>
 > = ComponentOptionsBase<
   Props,
   RawBindings,
@@ -415,15 +428,16 @@ type ObjectInjectOptions = Record<
   string | symbol | { from?: string | symbol; default?: unknown }
 >
 
-export type InjectToObject<T extends ComponentInjectOptions> = T extends string[]
-? {
-  [K in T[number]]?: unknown
-}
-: T extends ObjectInjectOptions
-? {
-  [K in keyof T]?: unknown
-}
-: never
+export type InjectToObject<T extends ComponentInjectOptions> =
+  T extends string[]
+    ? {
+        [K in T[number]]?: unknown
+      }
+    : T extends ObjectInjectOptions
+    ? {
+        [K in keyof T]?: unknown
+      }
+    : never
 
 interface LegacyOptions<
   Props,
index 4d6f1d059166ae36db77371f485de063c3f153b9..8f24b8dace4e1f735e464aba2adeb9acdca515c9 100644 (file)
@@ -153,7 +153,7 @@ export type CreateComponentPublicInstance<
   PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> &
     EnsureNonVoid<M>,
   PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> &
-    EnsureNonVoid<Defaults>,
+    EnsureNonVoid<Defaults>
 > = ComponentPublicInstance<
   PublicP,
   PublicB,