marko 5.42.0 → 5.43.0
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/index.d.ts +14 -6
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -350,16 +350,24 @@ declare global {
|
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
/**
|
|
353
|
-
* The
|
|
354
|
-
* a split component's file: `Marko.
|
|
353
|
+
* The component a module exports (a class's instance, or an object), eg of
|
|
354
|
+
* a split component's file: `Marko.ComponentOf<typeof import("./component")>`.
|
|
355
355
|
*/
|
|
356
|
-
export type
|
|
356
|
+
export type ComponentOf<Module> = 0 extends 1 & Module
|
|
357
357
|
? any
|
|
358
358
|
: Module extends { default: infer Exported }
|
|
359
|
-
?
|
|
359
|
+
? ComponentOf<Exported>
|
|
360
360
|
: Module extends abstract new (...args: any) => infer Instance
|
|
361
|
-
?
|
|
362
|
-
|
|
361
|
+
? Instance extends Component
|
|
362
|
+
? Instance
|
|
363
|
+
: Instance & Component
|
|
364
|
+
: Module & Component;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* The input of the component a module exports (a class, or an object), eg of
|
|
368
|
+
* a split component's file: `Marko.ComponentInput<typeof import("./component")>`.
|
|
369
|
+
*/
|
|
370
|
+
export type ComponentInput<Module> = ComponentOf<Module>["input"];
|
|
363
371
|
|
|
364
372
|
export type AttrTag<T> = T & {
|
|
365
373
|
[Symbol.iterator](): Iterator<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marko",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.43.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
|
|
6
6
|
"keywords": [
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"warp10": "^2.1.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"marko": "5.
|
|
86
|
+
"marko": "5.43.0"
|
|
87
87
|
},
|
|
88
88
|
"engines": {
|
|
89
89
|
"node": ">=22.12.0"
|