<commit_before>
class MyChannel implements  IChannel {
  private _transport : ITransport;
  private _currentSession : ISession;

  get Transport(): ITransport {
      return this._transport;
  }

  constructor(transport : ITransport) {
    this._transport = transport;
  }

  connect(auth : IAuthentication) : Promise<ISession> {
    return this._transport.open()
      .then((session : ISession) => {
        this._currentSession = session;
        return this;
      });
  }

  onMessage(callback: onEnvelopeReceived<IMessage>) : void {
    undefined;
  }
  onNotification(callback: onEnvelopeReceived<INotification>) : void {
    undefined;
  }
  onCommand(callback: onEnvelopeReceived<ICommand>) : void {
    undefined;
  }
}

class MyTransport implements ITransport {
    open() : Promise<ISession> {
      return null;
    };

    close() : Promise<void> {
      return null;
    };

    onError(error : any) : void {
      undefined;
    };
}

/// USAGE ...

var channel = new MyChannel(new MyTransport());
channel.connect(new GuestAuthentication()).then((x : ISession) => {
  undefined;
}).catch((x : any) => {
  undefined;
});<commit_msg>Add usage sample<commit_after>
class MyChannel implements  IChannel {
  private _transport : ITransport;
  private _currentSession : ISession;

  get Transport(): ITransport {
      return this._transport;
  }

  constructor(transport : ITransport) {
    this._transport = transport;
  }

  connect(auth : IAuthentication) : Promise<ISession> {
    return this._transport.open()
      .then((session : ISession) => {
        this._currentSession = session;
        return this;
      });
  }

  onMessage(callback: onEnvelopeReceived<IMessage>) : void {
    undefined;
  }
  onNotification(callback: onEnvelopeReceived<INotification>) : void {
    undefined;
  }
  onCommand(callback: onEnvelopeReceived<ICommand>) : void {
    undefined;
  }
}

class MyTransport implements ITransport {
    open() : Promise<ISession> {
      return null;
    };

    close() : Promise<void> {
      return null;
    };

    onError(error : any) : void {
      undefined;
    };
}

/// USAGE ...
let session : ISession;
let channel = new MyChannel(new MyTransport());
channel.connect(new GuestAuthentication()).then((currentSession : ISession) => {
  session = x;
}).catch((x : any) => {
  undefined;
});
{'fraction_non_alphanumeric': 0.12633832976445397, 'fraction_numerical': 0.0, 'mean_word_length': 3.2014388489208634, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3266073', 'n_tokens_mistral': 694, 'n_tokens_neox': 681, 'n_words': 150}