From 9b0dd3fbe4a2f46e00188eeb6803f3c4d80f674e Mon Sep 17 00:00:00 2001 From: Joe Pea Date: Mon, 6 Nov 2023 20:53:08 -0800 Subject: [PATCH] update lume cli version, update typescript version --- dist/observe.d.ts | 4 ++-- dist/observe.d.ts.map | 2 +- dist/observe.js | 4 ++-- dist/observe.js.map | 2 +- package.json | 5 +++-- src/observe.ts | 11 ++++++++--- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/dist/observe.d.ts b/dist/observe.d.ts index f4a96ea..33942eb 100644 --- a/dist/observe.d.ts +++ b/dist/observe.d.ts @@ -1,8 +1,8 @@ -declare type Options = { +type Options = { async: boolean; inherited: boolean; }; -declare type Callback = (propName: PropertyKey, value: any) => unknown; +type Callback = (propName: PropertyKey, value: any) => unknown; export declare function observe(object: T, propertyNames: (keyof T)[], callback: Callback, options?: Partial): void; export declare function unobserve(object: T, props: Callback | (keyof T)[], callback?: Callback): void; export {}; diff --git a/dist/observe.d.ts.map b/dist/observe.d.ts.map index 6110c07..67cc88c 100644 --- a/dist/observe.d.ts.map +++ b/dist/observe.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../src/observe.ts"],"names":[],"mappings":"AAEA,aAAK,OAAO,GAAG;IACd,KAAK,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,aAAK,QAAQ,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,KAAK,OAAO,CAAA;AAI9D,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EACvC,MAAM,EAAE,CAAC,EACT,aAAa,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,EAC1B,QAAQ,EAAE,QAAQ,EAClB,OAAO,GAAE,OAAO,CAAC,OAAO,CAAM,QAwB9B;AAKD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,QAAQ,QA0BxG"} \ No newline at end of file +{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../src/observe.ts"],"names":[],"mappings":"AAEA,KAAK,OAAO,GAAG;IACd,KAAK,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,KAAK,QAAQ,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,KAAK,OAAO,CAAA;AAI9D,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EACvC,MAAM,EAAE,CAAC,EACT,aAAa,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,EAC1B,QAAQ,EAAE,QAAQ,EAClB,OAAO,GAAE,OAAO,CAAC,OAAO,CAAM,QAwB9B;AAKD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,QAAQ,QA0BxG"} \ No newline at end of file diff --git a/dist/observe.js b/dist/observe.js index c0893cd..02841e5 100644 --- a/dist/observe.js +++ b/dist/observe.js @@ -75,8 +75,8 @@ function defineObservationGetterSetter(object, propName, options) { else { let _value = descriptor.value; if (!descriptor.writable) { - console.error(`Can not observe readonly property "${propName}" with descriptor`, descriptor, `of object:`, object); - throw new Error(`Can not observe readonly property "${propName}" of object: ${object} (see above)`); + console.error(`Can not observe readonly property "${String(propName)}" with descriptor`, descriptor, `of object:`, object); + throw new Error(`Can not observe readonly property "${String(propName)}" of object: ${object} (see above)`); } delete descriptor.value; delete descriptor.writable; diff --git a/dist/observe.js.map b/dist/observe.js.map index 4c8264e..dd95e95 100644 --- a/dist/observe.js.map +++ b/dist/observe.js.map @@ -1 +1 @@ -{"version":3,"file":"observe.js","sourceRoot":"","sources":["../src/observe.ts"],"names":[],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Q;QAAE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAA;IACrE,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAA;IAEtE,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE;QACtC,GAAG,UAAU;QACb,GAAG,EAAE,QAAQ;QACb,GAAG,CAAC,KAAK;YACR,QAAS,CAAC,KAAK,CAAC,CAAA;YAChB,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAS,EAAE,CAAC,CAAA;QAC5C,CAAC;KACD,CAAC,CAAA;IAEF,eAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AAC/B,CAAC;AAED,SAAS,YAAY,CAAmB,MAAS,EAAE,QAAiB,EAAE,KAAU;IAC/E,MAAM,SAAS,GAAG,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAE9D,IAAI,CAAC,SAAS;QAAE,OAAM;IAEtB,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;QACjC,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;KACzB;AACF,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index 518f69d..e14c932 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,9 @@ "lowclass": "^6.0.0" }, "devDependencies": { - "@lume/cli": "^0.9.0", - "prettier": "3.0.3" + "@lume/cli": "^0.10.0", + "prettier": "3.0.3", + "typescript": "^5.0.0" }, "repository": { "type": "git", diff --git a/src/observe.ts b/src/observe.ts index 84c51a3..940f3bd 100644 --- a/src/observe.ts +++ b/src/observe.ts @@ -123,9 +123,14 @@ function defineObservationGetterSetter(object: T, propName: ke let _value = descriptor.value if (!descriptor.writable) { - console.error(`Can not observe readonly property "${propName}" with descriptor`, descriptor, `of object:`, object) - - throw new Error(`Can not observe readonly property "${propName}" of object: ${object} (see above)`) + console.error( + `Can not observe readonly property "${String(propName)}" with descriptor`, + descriptor, + `of object:`, + object, + ) + + throw new Error(`Can not observe readonly property "${String(propName)}" of object: ${object} (see above)`) } delete descriptor.value