fix(config): update .smartconfig.json handling and harden bundler runtime compatibility
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
// Test file to verify decorator functionality
|
||||
const decoratedClasses: Function[] = [];
|
||||
|
||||
function trackClass(constructor: Function) {
|
||||
decoratedClasses.push(constructor);
|
||||
return constructor;
|
||||
function trackClass(value: Function, _context: ClassDecoratorContext) {
|
||||
decoratedClasses.push(value);
|
||||
}
|
||||
|
||||
function logMethod(_target: any, context: ClassMethodDecoratorContext) {
|
||||
function logMethod(method: Function, context: ClassMethodDecoratorContext) {
|
||||
const methodName = String(context.name);
|
||||
return function (this: any, ...args: any[]) {
|
||||
console.log(`Calling method: ${methodName}`);
|
||||
return (_target as Function).apply(this, args);
|
||||
return method.apply(this, args);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ export class MyElement extends LitElement {
|
||||
`;
|
||||
|
||||
@property({ type: String })
|
||||
name = 'World';
|
||||
accessor name = 'World';
|
||||
|
||||
@property({ type: Number })
|
||||
count = 0;
|
||||
accessor count = 0;
|
||||
|
||||
render() {
|
||||
return html`
|
||||
|
||||
@@ -4,9 +4,9 @@ const myConst: string = 'hello';
|
||||
|
||||
await smartdelay.delayFor(1000);
|
||||
|
||||
function sealed(constructor: Function) {
|
||||
Object.seal(constructor);
|
||||
Object.seal(constructor.prototype);
|
||||
function sealed(value: Function, _context: ClassDecoratorContext) {
|
||||
Object.seal(value);
|
||||
Object.seal(value.prototype);
|
||||
}
|
||||
|
||||
@sealed
|
||||
|
||||
Reference in New Issue
Block a user