armackey / nativescript-twilio-video

A Nativescript video chat plugin.
12 stars 8 forks source link

Some typescript type errors #12

Open Izrab opened 5 years ago

Izrab commented 5 years ago

I copied the same code from demo to my app, but there appear some type warnings, I cannot cloud build my project, I had to add the code after the app is built. There are actually two type errors, one saying RemoteVideo is not export in module twilio plugin, and the other error says cannot find name AVCaptureVideo. I use the latest twilio plugin (1.1.6), also I use NS 6.

Annotation 2019-07-27 180646 Annotation 2019-07-27 180709

armackey commented 5 years ago

The first error. I'm not sure why TS is saying it's an error. If you're not using, don't import it for now. The second error requires you to install tns-platform-declarations. I recommend you look it.

Izrab commented 5 years ago

@armackey , for the first error, I removed "RemoteVideo", because it is not used anyway. Is that okay and fine??

armackey commented 5 years ago

Yep. That's fine.

Izrab commented 5 years ago

@armackey I installed tns-platform-declarations package, but the red type error did not go away

Izrab commented 5 years ago

Either the red errors go away or I cannot build my app, because webpack errors rise.

armackey commented 5 years ago

did you actually look at the documentation for tns-platform-declarations?

armackey commented 5 years ago

documentation clearly states how to do this. a simple install isn't gonna cut it.

http://prntscr.com/okuuvg

Izrab commented 5 years ago

Alright the red type errors went away.

armackey commented 5 years ago

...i'll emphasize one last time. be sure to actually read docs.

Izrab commented 5 years ago

You're right, I should focus and be attentive and be caring, and read manuals. Thanks a lot. Now I just have the switch camera issue. You can close this issue, as the red warnings are gone.