debug-server-next
Version:
Dev server for hippy-core.
25 lines (24 loc) • 532 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.contextId = exports.requestId = void 0;
class GlobalId {
constructor(step = 1) {
this.step = step;
this.globalId = 0;
}
get id() {
return this.globalId;
}
create() {
this.globalId += this.step;
return this.globalId;
}
}
/**
* 全局调试协议 request command id
*/
exports.requestId = new GlobalId(-1);
/**
* 全局 js 执行上下文 id
*/
exports.contextId = new GlobalId();