Typescript `declare` syntax not supported in typescript eslint
- Dominant language
- JavaScript
- Stars
- 6.5k
- Forks
- 772
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The URL I'm working with might not live forever, but this is the error at the time of writing.
This is an issue with the transformer's parser. Parsing into the AST seems to work fine.
```
// Parsing error: Unexpected token
4 |
5 | export class Foo {
> 6 | declare regularProperty: number;
```
**To Reproduce**
Steps to reproduce the behavior:
as demonstrated in https://astexplorer.net/#/gist/109e7e211c47172833af69eff15cc565/149750098824767f23980eb51790bed2ba67cf7a
1. select `@typescript-eslint/parser`
2. use `declare` in a class. e.g.:
```ts
class Foo {
declare foo: number;
}
```
3. Notice error
**Expected behavior**
There should not be a parsing error
**Screenshots**

If applicable, add screenshots to help explain your problem.
**Browser (please complete the following information):**
- any browser
- any OS
**Additional Context**
Transforms that _don't_ error on the `declare` keyword:
- prettier
- babel-plugin-macros
- babelv7
Transforms that _do_ error on the `declare` keyword:
- tslint (which isn't used anymore anyway, so this is fine)
- jscodeshift (probably needs a specific parser set)
- ESLint v4 (I wouldn't expect this to work by default, but I don't know how I'd set the parser to `parser: '@typescript-eslint/parser',`, per: https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/README.md
- this is the parser I have selected in the ASTExplorer UI, but I don't quite know if that feeds or is configured directly with the transformer.
Of note, `declare` is new as of TypeScript 3.8 -- I couldn't find anything in the ASTExplorer UI to hint at which TypeScript version was being used.
I only see what versions of the parser and transform plugins are used:

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.