Closed mounirka closed 7 years ago
Likely TS issue, need to update/extend the d.ts
to put that property on the checkbox. You could also try:
let checkbox: CheckBox = ...
assuming you have import { CheckBox } from nativescript-checkbox
on the file. This way you assign the type to the variable, again the definition might need updating. Have to check on that later.
Even doing: let checkbox: CheckBox =
is say that type View is not assignable to type Checkbox.
Yea so the typings need to be updated for the compiler to recognize the prop.
You might try casting it this way:
let checkbox = <CheckBox>...
I forget how the compiler recognizes the types with casting.
There's even casting to any
which will for sure at least silence the compiler to prevent any errors thrown.
@mounirka I think I told you wrong it would be let checkbox = (<CheckBox>topmost()....)
to do the correct type assignment. If I get time I'll update the typings to not require this but for now that should work to assign the type to the view instance.
Hi guys, i followed the small tutorial you made, but when i do
It says that Property 'toggle' does not exist on type 'View'. How can i solve? thank you