11/*
2- * Copyright (C)2014-2020 Haxe Foundation
2+ * Copyright (C)2014-2026 Haxe Foundation
33 *
44 * Permission is hereby granted, free of charge, to any person obtaining a
55 * copy of this software and associated documentation files (the "Software"),
2222
2323package js .node .inspector ;
2424
25- import js .node .events .EventEmitter ;
2625import js .lib .Error ;
26+ import js .node .events .EventEmitter ;
2727
2828/**
2929 Enumeration of events emitted by `inspector.Session`.
@@ -35,22 +35,22 @@ enum abstract SessionEvent<T:haxe.Constraints.Function>(Event<T>) to Event<T> {
3535 /**
3636 Emitted when any notification from the V8 Inspector is received.
3737 **/
38- var InspectorNotification : SessionEvent <InspectorNotificationMessage -> Void > = " inspectorNotification" ;
38+ var InspectorNotification : SessionEvent <( message : InspectorNotificationMessage ) -> Void > = " inspectorNotification" ;
3939
4040 /**
4141 Emitted when an inspector notification is received with method `Debugger.paused`.
4242 **/
43- var DebuggerPaused : SessionEvent <InspectorNotificationMessage -> Void > = " Debugger.paused" ;
43+ var DebuggerPaused : SessionEvent <( message : InspectorNotificationMessage ) -> Void > = " Debugger.paused" ;
4444
4545 /**
4646 Emitted when an inspector notification is received with method `Debugger.resumed`.
4747 **/
48- var DebuggerResumed : SessionEvent <InspectorNotificationMessage -> Void > = " Debugger.resumed" ;
48+ var DebuggerResumed : SessionEvent <( message : InspectorNotificationMessage ) -> Void > = " Debugger.resumed" ;
4949
5050 /**
5151 Emitted when an inspector notification is received with method `HeapProfiler.addHeapSnapshotChunk`.
5252 **/
53- var HeapProfilerAddHeapSnapshotChunk : SessionEvent <InspectorNotificationMessage -> Void > = " HeapProfiler.addHeapSnapshotChunk" ;
53+ var HeapProfilerAddHeapSnapshotChunk : SessionEvent <( message : InspectorNotificationMessage ) -> Void > = " HeapProfiler.addHeapSnapshotChunk" ;
5454}
5555
5656/**
@@ -67,7 +67,10 @@ typedef InspectorNotificationMessage = {
6767 The `inspector.Session` is used for dispatching messages to the V8 inspector
6868 back-end and receiving message responses and notifications.
6969
70- @see https://nodejs.org/api/inspector.html#class-inspectorsession
70+ When using `Session`, objects outputted by the console API will not be released
71+ unless `Runtime.DiscardConsoleEntries` is posted manually.
72+
73+ @see https://nodejs.org/docs/latest-v24.x/api/inspector.html#class-inspectorsession
7174**/
7275@:jsRequire (" inspector" , " Session" )
7376extern class Session extends EventEmitter <Session > {
@@ -105,6 +108,6 @@ extern class Session extends EventEmitter<Session> {
105108 Protocol method names and parameter/result shapes follow the Chrome DevTools Protocol;
106109 they are typed as `String` / `Dynamic` rather than enumerating the full CDP schema.
107110 **/
108- @:overload (function (method : String , ? callback : Null <Error >-> Dynamic -> Void ): Void {})
109- function post (method : String , ? params : Dynamic , ? callback : Null <Error >-> Dynamic -> Void ): Void ;
111+ @:overload (function (method : String , ? callback : ( error : Null <Error >, result : Dynamic ) -> Void ): Void {})
112+ function post (method : String , ? params : Dynamic , ? callback : ( error : Null <Error >, result : Dynamic ) -> Void ): Void ;
110113}
0 commit comments