marko 6.0.36 → 6.0.38
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/translator/index.js +13 -11
- package/index.d.ts +20 -3
- package/package.json +2 -2
package/dist/translator/index.js
CHANGED
@@ -4538,7 +4538,7 @@ function trackParamsReferences(body, type, upstreamAlias) {
|
|
4538
4538
|
void 0,
|
4539
4539
|
addNumericPropertiesUntil(void 0, i - 1)
|
4540
4540
|
);
|
4541
|
-
} else {
|
4541
|
+
} else if (import_compiler24.types.isLVal(param)) {
|
4542
4542
|
createBindingsAndTrackReferences(
|
4543
4543
|
param,
|
4544
4544
|
type,
|
@@ -4706,15 +4706,17 @@ function createBindingsAndTrackReferences(lVal, type, scope, section, upstreamAl
|
|
4706
4706
|
if (hasRest) {
|
4707
4707
|
excludeProperties = propsUtil.add(excludeProperties, key);
|
4708
4708
|
}
|
4709
|
-
|
4710
|
-
|
4711
|
-
|
4712
|
-
|
4713
|
-
|
4714
|
-
|
4715
|
-
|
4716
|
-
|
4717
|
-
|
4709
|
+
if (import_compiler24.types.isLVal(prop.value)) {
|
4710
|
+
createBindingsAndTrackReferences(
|
4711
|
+
prop.value,
|
4712
|
+
type,
|
4713
|
+
scope,
|
4714
|
+
section,
|
4715
|
+
patternBinding,
|
4716
|
+
key,
|
4717
|
+
void 0
|
4718
|
+
);
|
4719
|
+
}
|
4718
4720
|
}
|
4719
4721
|
}
|
4720
4722
|
break;
|
@@ -4747,7 +4749,7 @@ function createBindingsAndTrackReferences(lVal, type, scope, section, upstreamAl
|
|
4747
4749
|
property,
|
4748
4750
|
excludeProperties
|
4749
4751
|
);
|
4750
|
-
} else {
|
4752
|
+
} else if (import_compiler24.types.isLVal(element)) {
|
4751
4753
|
createBindingsAndTrackReferences(
|
4752
4754
|
element,
|
4753
4755
|
type,
|
package/index.d.ts
CHANGED
@@ -46,8 +46,19 @@ declare global {
|
|
46
46
|
};
|
47
47
|
|
48
48
|
/** The result of calling `template.mount`. */
|
49
|
-
export type MountedTemplate<
|
50
|
-
|
49
|
+
export type MountedTemplate<
|
50
|
+
Input = unknown,
|
51
|
+
Return extends void | {
|
52
|
+
value: unknown;
|
53
|
+
valueChange?(next: unknown): void;
|
54
|
+
} = void,
|
55
|
+
> = {
|
56
|
+
get value(): Return extends { value: infer Value } ? Value : void;
|
57
|
+
set value(
|
58
|
+
next: Return extends { valueChange?(next: infer Next): any }
|
59
|
+
? Next
|
60
|
+
: never,
|
61
|
+
): void;
|
51
62
|
update(input: Marko.TemplateInput<Input>): void;
|
52
63
|
destroy(): void;
|
53
64
|
};
|
@@ -74,7 +85,13 @@ declare global {
|
|
74
85
|
B extends Body<infer Params, any> ? Params : never;
|
75
86
|
|
76
87
|
/** The top level api for a Marko Template. */
|
77
|
-
export abstract class Template<
|
88
|
+
export abstract class Template<
|
89
|
+
Input = unknown,
|
90
|
+
Return extends void | {
|
91
|
+
value: unknown;
|
92
|
+
valueChange?(next: unknown): void;
|
93
|
+
} = void,
|
94
|
+
> {
|
78
95
|
/**
|
79
96
|
* The folowing types are processed up by the @marko/language-tools
|
80
97
|
* and inlined into the compiled template.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "marko",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.0.38",
|
4
4
|
"description": "Optimized runtime for Marko templates.",
|
5
5
|
"keywords": [
|
6
6
|
"api",
|
@@ -48,7 +48,7 @@
|
|
48
48
|
"build": "node -r ~ts ./scripts/bundle.ts"
|
49
49
|
},
|
50
50
|
"dependencies": {
|
51
|
-
"@marko/compiler": "^5.39.
|
51
|
+
"@marko/compiler": "^5.39.29",
|
52
52
|
"csstype": "^3.1.3",
|
53
53
|
"magic-string": "^0.30.17"
|
54
54
|
},
|