File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,14 @@ export class BaseApi {
2222 this . client = client
2323 } else {
2424 Object . defineProperty ( this , 'client' , {
25+ enumerable : false ,
2526 value : this
2627 } )
2728 }
2829 }
2930
3031 protected get transport ( ) : Transport {
31- return this . client . _transport
32+ return this . client . transport
3233 }
3334
3435 public equals ( other : BaseApi ) : boolean {
Original file line number Diff line number Diff line change @@ -136,17 +136,23 @@ export class NeovimClient extends Neovim {
136136 private responses : Map < number , AsyncResponse > = new Map ( )
137137 private _channelId : number
138138 private attachedBuffers : Map < number , Map < string , Function [ ] > > = new Map ( )
139- public _transport : Transport
139+ private _transport : Transport
140140
141141 constructor ( private logger : ILogger , public readonly isVim : boolean ) {
142142 // Neovim has no `data` or `metadata`
143143 super ( { } )
144- this . _transport = isVim ? new VimTransport ( logger ) : new NvimTransport ( logger )
144+ const transport = isVim ? new VimTransport ( logger ) : new NvimTransport ( logger )
145+ Object . defineProperty ( this , '_transport' , {
146+ enumerable : false ,
147+ get : ( ) => {
148+ return transport
149+ }
150+ } )
145151 this . handleRequest = this . handleRequest . bind ( this )
146152 this . handleNotification = this . handleNotification . bind ( this )
147153 }
148154
149- protected get transport ( ) : Transport {
155+ public get transport ( ) : Transport {
150156 return this . _transport
151157 }
152158
You can’t perform that action at this time.
0 commit comments