github / github/eslint-plugin-github
Add TypeScript declaration file
- Langage dominant
- JavaScript
- Étoiles
- 336
- Forks
- 67
- Merge moyen
- 1 j 9 h
- PR mergées (30 j)
- 6
Description
In order to make the TypeScript language server see what actually is inside `eslint-plugin-github`, and to correctly suggest `github.getFlatConfigs`, I would like to request the addition of a declaration file.
```console
Could not find a declaration file for module 'eslint-plugin-github'. '/Users/robin/Sites/eslint-config-sweet/node_modules/eslint-plugin-github/lib/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/eslint-plugin-github` if it exists or add a new declaration (.d.ts) file containing `declare module 'eslint-plugin-github';`ts(7016)
```
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start by inspecting lib/index.js, the module path shown in the TypeScript error, to identify the exported API, including github.getFlatConfigs. Add a declaration file that represents those exports, then verify that the TypeScript language server no longer reports the missing declaration and can suggest getFlatConfigs.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, typescript
- Domaine
- tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 50/100