elegance-js 1.17.0 → 1.17.1
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/global.d.ts +2 -1
- package/dist/page_compiler.mjs +2 -2
- package/package.json +1 -1
package/dist/global.d.ts
CHANGED
|
@@ -27,8 +27,9 @@ declare global {
|
|
|
27
27
|
children: null;
|
|
28
28
|
options: Record<string, any> | Child;
|
|
29
29
|
};
|
|
30
|
-
type Page = (AnyBuiltElement) | (() => AnyBuiltElement) | (() => Promise<AnyBuiltElement>);
|
|
31
30
|
type Layout = ((child: Child) => (AnyBuiltElement | Promise<AnyBuiltElement>));
|
|
31
|
+
type LayoutMetadata = ((child: Child) => (AnyBuiltElement | Promise<AnyBuiltElement>));
|
|
32
|
+
type Page = (AnyBuiltElement) | (() => AnyBuiltElement) | (() => Promise<AnyBuiltElement>);
|
|
32
33
|
type Metadata = (() => (AnyBuiltElement)) | (() => Promise<AnyBuiltElement>);
|
|
33
34
|
type ObjectAttribute<T> = T extends ObjectAttributeType.STATE ? {
|
|
34
35
|
type: ObjectAttributeType;
|
package/dist/page_compiler.mjs
CHANGED
|
@@ -672,7 +672,7 @@ return __exports
|
|
|
672
672
|
}
|
|
673
673
|
{
|
|
674
674
|
if (!layoutElements) {
|
|
675
|
-
throw new Error(`WARNING: ${filePath} should export a const layout, which is of type (child: Child) => AnyBuiltElement.`);
|
|
675
|
+
throw new Error(`WARNING: ${filePath} should export a const layout, which is of type Layout: (child: Child) => AnyBuiltElement.`);
|
|
676
676
|
}
|
|
677
677
|
if (typeof layoutElements === "function") {
|
|
678
678
|
if (layoutElements.constructor.name === "AsyncFunction") {
|
|
@@ -684,7 +684,7 @@ return __exports
|
|
|
684
684
|
}
|
|
685
685
|
{
|
|
686
686
|
if (!metadataElements) {
|
|
687
|
-
throw new Error(`WARNING: ${filePath} should export a const
|
|
687
|
+
throw new Error(`WARNING: ${filePath} should export a const metadata, which is of type LayoutMetadata: (child: Child) => AnyBuiltElement.`);
|
|
688
688
|
}
|
|
689
689
|
if (typeof metadataElements === "function") {
|
|
690
690
|
if (metadataElements.constructor.name === "AsyncFunction") {
|