marko 5.41.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 +20 -0
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -349,6 +349,26 @@ declare global {
|
|
|
349
349
|
readonly _: Signature;
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
+
/**
|
|
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
|
+
*/
|
|
356
|
+
export type ComponentOf<Module> = 0 extends 1 & Module
|
|
357
|
+
? any
|
|
358
|
+
: Module extends { default: infer Exported }
|
|
359
|
+
? ComponentOf<Exported>
|
|
360
|
+
: Module extends abstract new (...args: any) => infer Instance
|
|
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"];
|
|
371
|
+
|
|
352
372
|
export type AttrTag<T> = T & {
|
|
353
373
|
[Symbol.iterator](): Iterator<T>;
|
|
354
374
|
};
|
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": [
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"types": "index.d.ts",
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@marko/compiler": "^5.43.5",
|
|
71
|
-
"@marko/runtime-tags": "6.5.
|
|
71
|
+
"@marko/runtime-tags": "6.5.1",
|
|
72
72
|
"app-module-path": "^2.2.0",
|
|
73
73
|
"argly": "^1.2.0",
|
|
74
74
|
"browser-refresh-client": "1.1.4",
|
|
@@ -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"
|