Skip to content

types(slots): Add typed slots #2693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
chore: fix tests
  • Loading branch information
pikax committed Nov 30, 2020
commit b4dc05f7295321f1c0a404f3ff2f80d5f7d62678
8 changes: 4 additions & 4 deletions packages/runtime-core/src/apiDefineComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export type DefineComponent<
Extends extends ComponentOptionsMixin = ComponentOptionsMixin,
E extends EmitsOptions = Record<string, any>,
EE extends string = string,
S = {},
S = any,
PP = PublicProps,
Props = Readonly<ExtractPropTypes<PropsOrPropOptions>>,
Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>
Expand Down Expand Up @@ -104,7 +104,7 @@ export function defineComponent<
Extends extends ComponentOptionsMixin = ComponentOptionsMixin,
E extends EmitsOptions = EmitsOptions,
EE extends string = string,
S = {}
S = any
>(
options: ComponentOptionsWithoutProps<
Props,
Expand Down Expand Up @@ -133,7 +133,7 @@ export function defineComponent<
Extends extends ComponentOptionsMixin = ComponentOptionsMixin,
E extends EmitsOptions = Record<string, any>,
EE extends string = string,
S = {}
S = any
>(
options: ComponentOptionsWithArrayProps<
PropNames,
Expand Down Expand Up @@ -174,7 +174,7 @@ export function defineComponent<
Extends extends ComponentOptionsMixin = ComponentOptionsMixin,
E extends EmitsOptions = Record<string, any>,
EE extends string = string,
S = {}
S = any
>(
options: ComponentOptionsWithObjectProps<
PropsOptions,
Expand Down
8 changes: 4 additions & 4 deletions packages/runtime-core/src/componentOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export interface ComponentOptionsBase<
Extends extends ComponentOptionsMixin,
E extends EmitsOptions,
EE extends string = string,
S = {},
S = any,
Defaults = {}
>
extends LegacyOptions<Props, D, C, M, Mixin, Extends>,
Expand Down Expand Up @@ -183,7 +183,7 @@ export type ComponentOptionsWithoutProps<
Extends extends ComponentOptionsMixin = ComponentOptionsMixin,
E extends EmitsOptions = EmitsOptions,
EE extends string = string,
S = {}
S = any
> = ComponentOptionsBase<
Props,
RawBindings,
Expand Down Expand Up @@ -222,7 +222,7 @@ export type ComponentOptionsWithArrayProps<
Extends extends ComponentOptionsMixin = ComponentOptionsMixin,
E extends EmitsOptions = EmitsOptions,
EE extends string = string,
S = {},
S = any,
Props = Readonly<{ [key in PropNames]?: any }>
> = ComponentOptionsBase<
Props,
Expand Down Expand Up @@ -262,7 +262,7 @@ export type ComponentOptionsWithObjectProps<
Extends extends ComponentOptionsMixin = ComponentOptionsMixin,
E extends EmitsOptions = EmitsOptions,
EE extends string = string,
S = {},
S = any,
Props = Readonly<ExtractPropTypes<PropsOptions>>,
Defaults = ExtractDefaultPropTypes<PropsOptions>
> = ComponentOptionsBase<
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime-core/src/componentPublicInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export type CreateComponentPublicInstance<
Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,
Extends extends ComponentOptionsMixin = ComponentOptionsMixin,
E extends EmitsOptions = {},
S = {},
S = any,
PublicProps = P,
Defaults = {},
MakeDefaultsOptional extends boolean = false,
Expand Down Expand Up @@ -169,7 +169,7 @@ export type ComponentPublicInstance<
C extends ComputedOptions = {},
M extends MethodOptions = {},
E extends EmitsOptions = {},
S = {},
S = any,
PublicProps = P,
Defaults = {},
MakeDefaultsOptional extends boolean = false,
Expand Down