bootstrap-vue: Typings bug from rc20 to rc21

Describe the bug

Bug with typings after upgrading from 2.0.0-rc20 to rc21:

Cannot extend an interface 'BvComponent'. Did you mean 'implements'?
    10 | 
    11 | // Component: b-alert
  > 12 | export declare class BAlert extends BvComponent {

This is happening with a lot of components.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 5
  • Comments: 17 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Fix will be available in v2.0.0-rc.22 when released.

I have the same problem, and it seems the change from interface to class does the trick.

After the change, there is one error left, a few lines above the BvComponent.

Changing

export interface BvPlugin extends PluginObject {
  install: PluginFunction<BvConfigOptions>
}

to

export interface BvPlugin extends PluginObject<BvConfigOptions> {
  install: PluginFunction<BvConfigOptions>
}

fixes that problem though.

I looked at another project that is similar, and they did the above changing interface to class for their component base declaration.

// Component base definition
export class BvComponent extends Vue {
  // Simple catch-all to allow any prop/type
  [key: string]: any
}

i only tested with the modal component, but so far i have not encountered other issues 👍

Sorry for answering this late. I’ll try whenever I can but can’t promiss too much.