摘要:
class A {} const proxy = new Proxy(new A(), { get(o, k) { if (!/\d+/.test(k.toString())) return o[k]; if (!o.prototype) o.prototype = {}; if (!o.proto 阅读全文
摘要:
在js中与第三方设备的通信 这是一个Xbox One手柄的demo,将手柄使用USB连接到PC上: See also: video Device APIs 通过JavaScript与蓝牙设备通信 在网络上访问USB设备 在Android版Chrome上与NFC设备互动 Serial port 连接到 阅读全文
摘要:
function myParseInt(str: string): number { let result = NaN; for (let i = 0; i < str.length; i++) { const dec: number = str.charCodeAt(i); if (dec < 4 阅读全文
摘要:
interface Type<T> extends Function { new (...args: any[]): T; } class Data { name = "ajanuw"; echo() {} get info() { return {}; } } function cls<T>(va 阅读全文