Skip to content
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

fix(runtime-core): components options should accept components define… #602

Merged
merged 1 commit into from
Jan 13, 2020

Commits on Jan 9, 2020

  1. fix(runtime-core): components options should accept components define…

    …d with defineComponent
    
    Currently, when using TypeScript, a component defined with `defineComponent` can not be used in the `components` options:
    
    ```typescript
    const comp = defineComponent({})
    defineComponent({
      components: { comp }
    })
    ```
    
    This example was throwing with:
    
    ```
    The last overload gave the following error.
        Type { comp: new () => ComponentPublicInstance<unknown, unknown, unknown, {}, {}, VNodeProps>; } is not assignable to type Record<string, Component>.
          Property comp is incompatible with index signature.
    ```
    
    This commit fixes the issue, and adds a simple repro in the dts tests.
    cexbrayat committed Jan 9, 2020
    Configuration menu
    Copy the full SHA
    a331117 View commit details
    Browse the repository at this point in the history