Skip to content

Add declaration files for TypeScript support#23

Open
samuelastech wants to merge 1 commit into
s0ftik3:masterfrom
samuelastech:chore/@types
Open

Add declaration files for TypeScript support#23
samuelastech wants to merge 1 commit into
s0ftik3:masterfrom
samuelastech:chore/@types

Conversation

@samuelastech

Copy link
Copy Markdown

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
Copy Markdown

are you guys here?

@sk8Guerra

Copy link
Copy Markdown

Would also be nice to have this types. 🫡

@besdar besdar mentioned this pull request Aug 1, 2024
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.

3 participants