File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/vs/platform/terminal/node Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,18 @@ import { hasKey } from '../../../base/common/types.js';
3737type XtermTerminal = pkg . Terminal ;
3838const { Terminal : XtermTerminal } = pkg ;
3939
40+ interface ITraceRpcArgs {
41+ logService : ILogService ;
42+ simulatedLatency : number ;
43+ }
44+
4045export function traceRpc ( _target : Object , key : string , descriptor : PropertyDescriptor ) {
4146 if ( typeof descriptor . value !== 'function' ) {
4247 throw new Error ( 'not supported' ) ;
4348 }
4449 const fnKey = 'value' ;
4550 const fn = descriptor . value ;
46- descriptor [ fnKey ] = async function < TThis extends { traceRpcArgs : { logService : ILogService ; simulatedLatency : number } } > ( this : TThis , ...args : unknown [ ] ) {
51+ descriptor [ fnKey ] = async function < TThis extends { traceRpcArgs : ITraceRpcArgs } > ( this : TThis , ...args : unknown [ ] ) {
4752 if ( this . traceRpcArgs . logService . getLevel ( ) === LogLevel . Trace ) {
4853 this . traceRpcArgs . logService . trace ( `[RPC Request] PtyService#${ fn . name } (${ args . map ( e => JSON . stringify ( e ) ) . join ( ', ' ) } )` ) ;
4954 }
@@ -123,7 +128,7 @@ export class PtyService extends Disposable implements IPtyService {
123128 }
124129
125130 @memoize
126- get traceRpcArgs ( ) : { logService : ILogService ; simulatedLatency : number } {
131+ get traceRpcArgs ( ) : ITraceRpcArgs {
127132 return {
128133 logService : this . _logService ,
129134 simulatedLatency : this . _simulatedLatency
You can’t perform that action at this time.
0 commit comments