]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
types: fix setup this type (#605)
authorYang Mingshan <y.mingshan3@gmail.com>
Fri, 10 Jan 2020 16:46:34 +0000 (00:46 +0800)
committerEvan You <yyx990803@gmail.com>
Fri, 10 Jan 2020 16:46:34 +0000 (11:46 -0500)
packages/runtime-core/src/apiOptions.ts

index b306943f855c178bbde55fb412176db993b5369a..ad1ab8676a5cdc9580bc551b653e9608498aefc2 100644 (file)
@@ -51,7 +51,7 @@ export interface ComponentOptionsBase<
   M extends MethodOptions
 > extends LegacyOptions<Props, RawBindings, D, C, M>, SFCInternalOptions {
   setup?: (
-    this: null,
+    this: void,
     props: Props,
     ctx: SetupContext
   ) => RawBindings | RenderFunction | void
@@ -82,7 +82,7 @@ export type ComponentOptionsWithoutProps<
   D = {},
   C extends ComputedOptions = {},
   M extends MethodOptions = {}
-> = ComponentOptionsBase<Props, RawBindings, D, C, M> & {
+> = ComponentOptionsBase<Readonly<Props>, RawBindings, D, C, M> & {
   props?: undefined
 } & ThisType<ComponentPublicInstance<{}, RawBindings, D, C, M, Readonly<Props>>>