Skip to content

Commit e0fef9a

Browse files
authored
Ensure estypes is exported in ESM modules (#3174) (#3177)
1 parent a4d6752 commit e0fef9a

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ export type {
5454
ApiKeyAuth,
5555
BearerAuth
5656
} from '@elastic/transport'
57+
58+
export * as estypes from './api/types'

test/esm/import.test.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ import {
1818
UndiciConnection,
1919
WeightedConnectionPool,
2020
errors,
21-
events
21+
events,
22+
estypes
2223
} from '../../esm/index.js'
2324

2425
test('ESM imports work correctly', t => {
25-
t.plan(4)
26+
t.plan(5)
2627
t.equal(typeof Client, 'function', 'Client should be a function')
2728
t.equal(typeof errors, 'object', 'errors should be an object')
2829
t.equal(typeof SniffingTransport, 'function', 'SniffingTransport should be a function')
30+
t.equal(typeof estypes, 'object', 'estypes should be an object')
2931

3032
const client = new Client({
3133
node: 'http://localhost:9200',

0 commit comments

Comments
 (0)