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

Add declaration files for TypeScript support #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samuelastech
Copy link

My TypeScript project needed to use getContext feature so I write a declaration for it inside @types folder and indicate this in package.json.

Without it, we always will get an error (Could not find a declaration file for this module) when importing reverso-api in a TypeScript file.

Reference: DefinitelyTyped

File Purpose
index.d.ts This contains the typings for the package.
reverso-api-tests.ts This contains sample code which tests the typings. This code does not run, but it is type-checked.
tsconfig.json This allows you to run tsc within the package.
tslint.json Enables linting.
.eslintrc.json (Rarely) Needed only to disable lint rules written for eslint.

@yassine-safraoui
Copy link

are you guys here?

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

Successfully merging this pull request may close these issues.

None yet

2 participants