radar-sdk-js icon indicating copy to clipboard operation
radar-sdk-js copied to clipboard

Typescript?

Open optojack opened this issue 2 years ago • 2 comments

Hello, I have been tasked with finding a solution to get address autocomplete for my company and came across Radar and would love to use it, however we use pretty strict typescript and thus makes using this package pretty difficult.

Are there any plans to convert to typescript? Or at least publish a types package?

optojack avatar Sep 15 '22 20:09 optojack

Hi @jackLIT,

That's great to hear you're considering Radar! Typescript bindings and converting the project to typescript is on our long-list of improvements to project, but probably not something we'll get to in the near term.

That being said, we're always open to contributions.

kochis avatar Sep 15 '22 20:09 kochis

@kochis Thanks for the quick feedback! I am interested if there is any type of a public roadmap that's available to at least see where the direction of this package is headed?

I would also be interested on your thoughts of possibly a slow conversion of the project into typescript?

PS. Just realized I was on my work account before, I am the same as @jackLIT lol

jacklynch00 avatar Sep 20 '22 03:09 jacklynch00

For those just looking to ignore "Could not find a declaration" error in VS Code and TypeScript.

At the root of your project, create a file called external.d.ts with the content of:

declare module 'radar-sdk-js';

This will squash the error warning on your import.

cjboco avatar Jun 25 '23 22:06 cjboco

Just wanted to post an update, we now have a v4 version of the SDK in beta, that has been fully updated with typescript.

You can check it out here: https://github.com/radarlabs/radar-sdk-js/tree/v4-beta (see MIGRATION for more details on upgrading to the latest version)

kochis avatar Jun 30 '23 18:06 kochis

Types are now available: https://github.com/radarlabs/radar-sdk-js/blob/master/src/types.ts

kochis avatar Jul 21 '23 19:07 kochis