developit / developit/greenlet
ESLint/TypeScript: Any way to mark the function as external/scope-less?
Aperta
- Lingua principale
- JavaScript
- Stelle
- 4.7k
- Fork
- 97
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
This piece of code passes every static analyzer, ESLint and TS because they don't know that the arrow function is run in a different context:
```js
import greenlet from 'greenlet'
const myFavNumber = 43;
const getFav = greenlet( async () => {
return myFavNumber
});
```
Are you aware of any way to mark the function in a way that linters/parsers know `myFavNumber` is not defined in the function?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.