@yume-chan/scrcpy
Version:
TypeScript implementation of Scrcpy client.
18 lines • 459 B
JavaScript
export class InstanceId {
static NONE = /* #__PURE__ */ new InstanceId(-1);
static random() {
// A random 31-bit unsigned integer
return new InstanceId((Math.random() * 0x80000000) | 0);
}
value;
constructor(value) {
this.value = value;
}
toOptionValue() {
if (this.value < 0) {
return undefined;
}
return this.value.toString(16);
}
}
//# sourceMappingURL=init.js.map