alexrainman / nativescript-carousel-view

CarouselView plugin for NativeScript
MIT License
16 stars 5 forks source link

Generate third party library definitions #4

Closed alexrainman closed 8 years ago

alexrainman commented 8 years ago

@bradmartin i am including a third party library with gradle like this

dependencies {
  compile 'me.relex:circleindicator:1.2.2@aar'
}

But i cannot access the library from TypeScript. What i am missing? Do i need to generate the definitions? How?

bradmartin commented 8 years ago

I think there's a tool to generate the typings for native libs from NativeScript. Ive never used it though.

On Fri, Nov 4, 2016, 8:27 PM Alex Rainman notifications@github.com wrote:

@bradmartin https://github.com/bradmartin i am including a third party library with gradle like this

dependencies { compile 'me.relex:circleindicator:1.2.2@aar' }

But i cannot access the library from TypeScript. What i am missing? Do i need to generate the definitions? How?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexrainman/nativescript-carousel-view/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/AFulhFDKDdf4_CkkKv0sf_lQu_WDCzsFks5q69uYgaJpZM4KqIEn .

bradmartin commented 8 years ago

Saw your issue on the repo. To bypass the compiler I'm sure you're aware of casting to any but just wanted to check. I don't know where I read about the tool to create ts defs from native libs. Ive just never used it so I can find anything on it :/

On Fri, Nov 4, 2016, 9:20 PM Brad Martin bradwaynemartin@gmail.com wrote:

I think there's a tool to generate the typings for native libs from NativeScript. Ive never used it though.

On Fri, Nov 4, 2016, 8:27 PM Alex Rainman notifications@github.com wrote:

@bradmartin https://github.com/bradmartin i am including a third party library with gradle like this

dependencies { compile 'me.relex:circleindicator:1.2.2@aar' }

But i cannot access the library from TypeScript. What i am missing? Do i need to generate the definitions? How?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexrainman/nativescript-carousel-view/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/AFulhFDKDdf4_CkkKv0sf_lQu_WDCzsFks5q69uYgaJpZM4KqIEn .

alexrainman commented 8 years ago

Tried to cast to any but didnt work

bradmartin commented 8 years ago

Did you just try declare var me: any;? or (<any>me...); ?

alexrainman commented 8 years ago

@bradmartin i was able to translate CirclePageIndicator to TS and it works just fine. Just an small issue to solve and i am ready to release next version with indicators included :)

bradmartin commented 8 years ago

Very nice man. I haven't had much time to dive in and try it out lately :(

On Mon, Nov 7, 2016, 8:50 AM Alex Rainman notifications@github.com wrote:

@bradmartin https://github.com/bradmartin i was able to translate CirclePageIndicator to TS and it works just fine. Just an small issue to solve and i am ready to release next version with indicators included :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexrainman/nativescript-carousel-view/issues/4#issuecomment-258855663, or mute the thread https://github.com/notifications/unsubscribe-auth/AFulhM7iQcwQXZR5bLzOZI4wNaghZTSlks5q7zrSgaJpZM4KqIEn .