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

Error: 'typeof CanvasView' is not assignable to type 'ViewClass' #12

Open
amlibtest opened this issue Feb 14, 2020 · 1 comment
Open

Comments

@amlibtest
Copy link

amlibtest commented Feb 14, 2020

Make sure to check the demo app(s) for sample usage

Make sure to check the existing issues in this repository

If the demo apps cannot help and there is no issue for your problem, tell us about it

Please, ensure your title is less than 63 characters long and starts with a capital
letter.

Which platform(s) does your issue occur on?

  • Both (though not tested on iOS, but it doesn't run, so it's for both)

Please, provide the following version numbers that your issue occurs with:

  • CLI: 5.4.2
  • Cross-platform modules: 5.4.3
  • Runtime(s): tns-android version 5.4.0, nativescript-angular 8.0.0
  • Plugin(s): 2.1.24

Please, tell us how to recreate the issue in as much detail as possible.

Describe the steps to reproduce it.

The instructions on the README.md file doesn't work.

Is there any code involved?

  • provide a code example to recreate the problem

this is my app.module

import { registerElement } from "nativescript-angular/element-registry";
import { CanvasView } from 'nativescript-canvas';

registerElement('CanvasView', () => CanvasView);

And I'm getting this error:

Type 'typeof CanvasView' is not assignable to type 'ViewClass'.
  Type 'CanvasView' is not assignable to type 'View'.
    Property 'android' is missing in type 'CanvasView'.
element-registry.d.ts(46, 36): The expected type comes from the return type of this signature.
@farfromrefug
Copy link
Member

What is that ViewClass type? Can you share it?
I dont use angular

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