github / github/eslint-plugin-github

Add TypeScript declaration file

Aperta
#606 1 commento 5 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
336
Fork
67
Merge medio
1g 9h
PR unite (30g)
6

Descrizione

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)
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, typescript
Ambito
tooling
Tipo di issue
Funzionalità
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
50/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.