本文整理汇总了TypeScript中chalk.red.bgWhite方法的典型用法代码示例。如果您正苦于以下问题:TypeScript red.bgWhite方法的具体用法?TypeScript red.bgWhite怎么用?TypeScript red.bgWhite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chalk.red
的用法示例。
在下文中一共展示了red.bgWhite方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: assert
this._activateSession(internalSession, (err: Error | null /*, newSession?: ClientSessionImpl*/) => {
if (!err) {
if (old_client !== this) {
// remove session from old client:
if (old_client) {
old_client._removeSession(internalSession);
assert(!_.contains(old_client._sessions, internalSession));
}
this._addSession(internalSession);
assert(internalSession._client === this);
assert(!internalSession._closed, "session should not vbe closed");
assert(_.contains(this._sessions, internalSession));
}
callback();
} else {
// istanbul ignore next
if (doDebug) {
debugLog(chalk.red.bgWhite("reactivateSession has failed !"), err.message);
}
callback(err);
}
});
示例2: repair_client_sessions
export function repair_client_sessions(client: OPCUAClientImpl, callback: (err?: Error) => void): void {
const self = client;
debugLog(chalk.red.bgWhite(" Starting sessions reactivation"));
// repair session
const sessions = self._sessions;
async.map(sessions, (session: ClientSessionImpl, next: (err?: Error) => void) => {
repair_client_session(client, session, next);
}, (err) => {
return callback(err!);
});
}