Open nicolo-ribaudo opened 3 months ago
let BluethootDevice_create; class BluethootDevice { #id!: string; static #allowConstruct = false; private constructor() { if (!BluethootDevice.#allowConstruct) { throw new Error("You cannot instantiate this class directly"); } } static { BluethootDevice_create = (id: string) => { BluethootDevice.#allowConstruct = true; const device = new BluethootDevice(); BluethootDevice.#allowConstruct = false; device.#id = id; return device; }; } get id() { return this.#id; } } BluethootDevice_create("aa");
deno_lint marks BluethootDevice as unused and tells me to rename it to _BluethootDevice, but it's used by the BluethootDevice_create.
BluethootDevice
_BluethootDevice
BluethootDevice_create
deno_lint marks
BluethootDevice
as unused and tells me to rename it to_BluethootDevice
, but it's used by theBluethootDevice_create
.