ui-canvas icon indicating copy to clipboard operation
ui-canvas copied to clipboard

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

Open amlibtest opened this issue 5 years ago • 1 comments

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.

amlibtest avatar Feb 14 '20 14:02 amlibtest

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

farfromrefug avatar Feb 14 '20 14:02 farfromrefug