@tscircuit/core 0.0.194 → 0.0.195
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/dist/index.d.ts +1 -0
- package/dist/index.js +10 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -149,6 +149,7 @@ declare abstract class PrimitiveComponent<ZodProps extends ZodType = any> extend
|
|
|
149
149
|
props: z.input<ZodProps>;
|
|
150
150
|
_parsedProps: z.infer<ZodProps>;
|
|
151
151
|
get componentName(): string;
|
|
152
|
+
getInheritedProperty(propertyName: string): any;
|
|
152
153
|
get lowercaseComponentName(): string;
|
|
153
154
|
externallyAddedAliases: string[];
|
|
154
155
|
/**
|
package/dist/index.js
CHANGED
|
@@ -488,6 +488,16 @@ var PrimitiveComponent = class extends Renderable {
|
|
|
488
488
|
get componentName() {
|
|
489
489
|
return this.config.componentName;
|
|
490
490
|
}
|
|
491
|
+
getInheritedProperty(propertyName) {
|
|
492
|
+
let current = this;
|
|
493
|
+
while (current) {
|
|
494
|
+
if (current._parsedProps && propertyName in current._parsedProps) {
|
|
495
|
+
return current._parsedProps[propertyName];
|
|
496
|
+
}
|
|
497
|
+
current = current.parent;
|
|
498
|
+
}
|
|
499
|
+
return void 0;
|
|
500
|
+
}
|
|
491
501
|
get lowercaseComponentName() {
|
|
492
502
|
return this.componentName.toLowerCase();
|
|
493
503
|
}
|