Closed
Description
🐛 Bug Report
The TypeScript typedefs in index.d.ts
do not include the errors
key that is exported in index.js
. This makes it impossible to import error types and check them in try/catch statements.
To Reproduce
Steps to reproduce the behavior:
Paste your code here:
import { Client, errors } from '@elastic/elasticsearch';
Expected behavior
I expect the errors structure to be imported so I can check e instanceof errors.ResponseError
.
Paste the results here:
TypeScript says: `Module has no exported member 'errors'.`
Your Environment
- node version: 10
@elastic/elasticsearch
version: >=7.0.0- os: Mac
- Using TypeScript typedefs
Metadata
Metadata
Assignees
Labels
No labels