Skip to content

v7.2.6

Latest
Compare
Choose a tag to compare
@ktsn ktsn released this 17 Sep 11:38
· 8 commits to master since this release

Bug Fixes

  • make mixins helper type compatible with previous usage (#454) (bdcec69)

    This is a fix to retain backward compatibility to the old mixins type. Although it is recommended not to manually specify mixin types via the type parameters of mixins. e.g.

    // NOT recommended
    @Component
    class MyComp extends mixins<Foo & Bar>(Foo, Bar) {
      // ...
    }

    Because you can pass any type to the parameter even if it is not matched with the actual mixin structure.

    If you want to specify a generic type parameter for your class component, you can extend it before passing in mixins helper.

    @Component
    class GenricComponent<T> extends Vue {
      value: T
    }
    
    // Specify the generic parameter by extending it
    @Component
    class SpecialComponent extends GenericComponent<string> {}
    
    // Use the specified one as a mixin
    @Component
    class MyComp extends mixins(SpecialComponent) {
      // ...
    }
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy