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

Support for TypeScript #6

Open
binrohan opened this issue Jun 26, 2024 · 1 comment
Open

Support for TypeScript #6

binrohan opened this issue Jun 26, 2024 · 1 comment

Comments

@binrohan
Copy link

Expected Behaviour

This is should add the class as component. It is not working because of ts.

import {register} from '@nc/component-loader';

class testScript {

    constructor() {
        this.init();
    }

    public init(): void {
        window.alert('Hello World');
    }
}

register({testScript});
@easingthemes
Copy link
Member

What error do you receive. It works fine for this demo: https://playcode.io/1942178
Screenshot 2024-07-18 at 16 25 40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants