snice 1.13.2 → 1.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/templates/base/README.md +1 -1
- package/package.json +1 -1
- package/src/element.ts +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snice",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Imperative TypeScript framework for building vanilla web components with decorators, routing, and controllers. No virtual DOM, no build complexity.",
|
|
6
6
|
"main": "src/index.ts",
|
package/src/element.ts
CHANGED
|
@@ -805,6 +805,17 @@ export function dispose() {
|
|
|
805
805
|
export function part(partName: string, options: PartOptions = {}) {
|
|
806
806
|
return function (target: any, methodName: string, descriptor: PropertyDescriptor) {
|
|
807
807
|
const constructor = target.constructor;
|
|
808
|
+
|
|
809
|
+
// Handle case where descriptor might be undefined (TypeScript experimental decorators)
|
|
810
|
+
if (!descriptor) {
|
|
811
|
+
descriptor = Object.getOwnPropertyDescriptor(target, methodName) || {
|
|
812
|
+
value: target[methodName],
|
|
813
|
+
writable: true,
|
|
814
|
+
enumerable: true,
|
|
815
|
+
configurable: true
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
|
|
808
819
|
const originalMethod = descriptor.value;
|
|
809
820
|
|
|
810
821
|
if (!constructor[PARTS]) {
|