Skip to content

Commit 4ff4de8

Browse files
authored
chore: add types to the debugger session object (#6922)
1 parent 8378ffd commit 4ff4de8

File tree

1 file changed

+11
-1
lines changed
  • packages/dd-trace/src/debugger/devtools_client

1 file changed

+11
-1
lines changed

packages/dd-trace/src/debugger/devtools_client/session.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
const inspector = require('./inspector_promises_polyfill')
44

5-
const session = module.exports = new inspector.Session()
5+
/**
6+
* @typedef {import('node:events').EventEmitter & {
7+
* connect: () => void,
8+
* connectToMainThread: () => void
9+
* disconnect: () => void,
10+
* post: (method: string, params?: object) => Promise<any>,
11+
* }} CDPSession
12+
*/
13+
const session = /** @type {CDPSession} */ (new inspector.Session())
614

715
session.connectToMainThread()
16+
17+
module.exports = session

0 commit comments

Comments
 (0)