From: Yang Mingshan Date: Fri, 10 Jan 2020 16:46:34 +0000 (+0800) Subject: types: fix setup this type (#605) X-Git-Tag: v3.0.0-alpha.2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f46519994615703a6433036d06e1a457794ed92f;p=thirdparty%2Fvuejs%2Fcore.git types: fix setup this type (#605) --- diff --git a/packages/runtime-core/src/apiOptions.ts b/packages/runtime-core/src/apiOptions.ts index b306943f85..ad1ab8676a 100644 --- a/packages/runtime-core/src/apiOptions.ts +++ b/packages/runtime-core/src/apiOptions.ts @@ -51,7 +51,7 @@ export interface ComponentOptionsBase< M extends MethodOptions > extends LegacyOptions, 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 & { +> = ComponentOptionsBase, RawBindings, D, C, M> & { props?: undefined } & ThisType>>