facebook / facebook/hermes

prettier-plugin-hermes-parser: error with prettier when declare namespace

Open
#1,546 0 comments 0 reactions 1 assignee Claimed by @pieterv View on GitHub
bug
Dominant language
JavaScript
Stars
11.3k
Forks
859
Avg merge
1h 30m
Merged PRs (30d)
3

Description

## Bug Description

Prettier fails if the code contains `declare namespace`

```
[error] flow-typed/zipkin_vx.x.x.js: Error: Missing visitor keys for 'DeclareNamespace'.
[error] at getVisitorKeys3 (~/web/node_modules/prettier-plugin-hermes-parser/dist/third-party/internal-prettier-v3/plugins/estree.js:1236:29)
[error] at ~/web/node_modules/prettier-plugin-hermes-parser/dist/third-party/internal-prettier-v3/ast-to-doc.js:1162:44
...
```

Library module:

```
declare module 'zipkin' {
declare namespace sampler {
declare const neverSample: () => boolean;
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.