]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: Merge branch 'feat/expose' into script-setup-2
authorEvan You <yyx990803@gmail.com>
Sat, 14 Nov 2020 17:50:32 +0000 (12:50 -0500)
committerEvan You <yyx990803@gmail.com>
Sat, 14 Nov 2020 17:50:32 +0000 (12:50 -0500)
1  2 
packages/runtime-core/src/component.ts
packages/runtime-core/src/componentOptions.ts

index 8a7bd69fe4a0cb0903bd53b0a493c4500c06c248,af4c6b2f813993a112e30bbd3d7fa3c99bf6e4f4..61949c4c5ee61da2c26a62716e455a3cfe1593e0
@@@ -105,7 -105,7 +105,7 @@@ export interface ComponentInternalOptio
  export interface FunctionalComponent<P = {}, E extends EmitsOptions = {}>
    extends ComponentInternalOptions {
    // use of any here is intentional so it can be a valid JSX Element constructor
-   (props: P, ctx: SetupContext<E, P>): any
 -  (props: P, ctx: Omit<SetupContext<E>, 'expose'>): any
++  (props: P, ctx: Omit<SetupContext<E, P>, 'expose'>): any
    props?: ComponentPropsOptions<P>
    emits?: E | (keyof E)[]
    inheritAttrs?: boolean
@@@ -751,10 -760,10 +764,11 @@@ function createSetupContext(instance: C
      })
    } else {
      return {
 +      props: instance.props,
        attrs: instance.attrs,
        slots: instance.slots,
-       emit: instance.emit
+       emit: instance.emit,
+       expose
      }
    }
  }