import { estypes } is not working anymore in an ESM file
Category: Bug
### Regression report
Importing `estypes` in an ESM file fails since `9.3.0`.
### Last working version
9.2.1
### To reproduce
In any ESM file, import `estypes`:
```ts
import type { estypes } from '@elastic/elasticsearch'
```
It produces the following error:
```
Module '"@elastic/elasticsearch"' has no exported member 'estypes'.
```
The reason being TS opens `./esm/index.d.ts` that has not `estypes` and not `./index.d.ts` which has it. I believe `./esm/index.d.ts` should contain `export * as estypes from './api/types.js'`.
### Expected behavior
It should compile without an issue.
### Node.js version
24.13.0
### TypeScript version
5.9.3
### Elasticsearch client version
9.3.0
### Elasticsearch server version
N/A
### Operating system
_No response_
### Any other relevant environment information.
_No response_
关闭于 2026-02-09 2 条评论