Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant't found types to use it with typescript #124

Closed
jyeros opened this issue Mar 31, 2020 · 9 comments
Closed

Cant't found types to use it with typescript #124

jyeros opened this issue Mar 31, 2020 · 9 comments

Comments

@jyeros
Copy link

jyeros commented Mar 31, 2020

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

@awhitford
Copy link

@awhitford
Copy link

@ryan6416
Copy link

Any update on the type definitions?

@cloudworkpro-dave
Copy link

Any update on this?

@ajhollowayvrm
Copy link

Anything?

@jakerainis
Copy link

Bumping.

@svc-developer
Copy link
Collaborator

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

@svc-developer
Copy link
Collaborator

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

@svc-developer
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants