How to use the vue-tsx-support.createComponent function in vue-tsx-support

To help you get started, we’ve selected a few vue-tsx-support examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wonderful-panda / vue-tsx-support / test / tsc / basic / extend.tsx View on Github external
function by_createComponent() {
    const Base = vuetsx.createComponent({});

    // NG
    ;   //// TS2322 | TS2326 | TS2769: 'foo' is missing
    // OK
    ;
    // NG
    ;   //// TS2322 | TS2339 | TS2769: Property 'bar' does not exist
    // NG
    ;   //// TS2322 | TS2339 | TS2769: Property 'onErr' does not exist

    /* add more attributes */
    const Extend = vuetsx.ofType().extendFrom(Base);
    // OK
     console.log(s) } />;
    // NG
    ;   //// TS2322 | TS2326 | TS2769: 'bar' is missing
github wonderful-panda / vue-tsx-support / test / tsc / basic / register-global-component.ts View on Github external
import * as vuetsx from "vue-tsx-support";
import Vue from "vue";

interface Props {
    text: string;
}

const MyComponent = vuetsx.createComponent({});
Vue.component("my-component", MyComponent);