avadev/AvaTax-REST-V2-JS-SDK

Cant't found types to use it with typescript

jyeros opened this issue · 9 comments

I am using typescript and install avatax, but when I import it i got the error

Could not find a declaration file for module 'avatax'. 'node_modules/avatax/index.js' implicitly has an 'any' type.
  Try `npm install @types/avatax` if it exists or add a new declaration (.d.ts) file containing `declare module 'avatax';`ts(7016)

If i try npm install @types/avatax the response is no found.

Could you provide .d.ts file with typescript types

Any update on the type definitions?

Any update on this?

Anything?

Bumping.

The JavaScript Avatax SDK has existing limitations due to the fact that no models are present. When the caller is passing information to a method which will invoke the corresponding Avatax API, they have no idea what the model looks like or is expected without digging through the Avalara documentation on their own.

We have created a Typescript version of the Avatax SDK, which includes full support for models and enums. Javascript and Typescript developers will now get intelisense from any IDE which supports type files. Additionally, they will be able to navigate directly to the model definitions in the IDE and see exactly what is required and optional instead of having to look at some external documentation. We also added documentation for each method in the SDK which describes what the API does and other information.

The new version of the SDK is fully backwards compatible, so existing developers can take advantage of these new, useful features without having to make any changes to their code base.

We are looking for people willing to test out an early version of the SDK.

Steps to use:

  1. npm install ava-typescript --save
  2. Replace all require / imports to 'avatax' to 'ava-typescript'

Thank you.
cc: @jakerainis @ajhollowayvrm @cloudworkpro-dave @ryan-efendy @jyeros @awhitford

We have released the Typescript version of the JS SDK today (11/3/22), release 22.11.1. Please check it out we welcome any feedback. https://github.com/avadev/AvaTax-REST-V2-JS-SDK/releases/tag/22.11.1

Note to all devs trying ava-typescript: ava-typescript will now be deprecated and unpublished as we released Typescript with the 22.11.1 release on 11-03-22 for Avatax, please point to that release as it will be what we use for Typescript and Javascript moving forward. @awhitford @jakerainis @ryan-efendy @ajhollowayvrm @jyeros