@marko/language-server 2.1.21 → 2.1.23
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/marko.internal.d.ts +32 -13
- package/package.json +2 -2
package/dist/marko.internal.d.ts
CHANGED
|
@@ -131,7 +131,9 @@ declare global {
|
|
|
131
131
|
: never
|
|
132
132
|
>;
|
|
133
133
|
|
|
134
|
-
export function change<const Item>(
|
|
134
|
+
export function change<const Item extends readonly unknown[]>(
|
|
135
|
+
...item: Item
|
|
136
|
+
): UnionToIntersection<
|
|
135
137
|
Item extends
|
|
136
138
|
| readonly [infer LocalName extends string, infer Data]
|
|
137
139
|
| readonly [
|
|
@@ -397,23 +399,29 @@ declare global {
|
|
|
397
399
|
export function mergeAttrTags<Attrs extends readonly any[]>(
|
|
398
400
|
...attrs: Attrs
|
|
399
401
|
): MergeAttrTags<Attrs>;
|
|
400
|
-
export function attrTag<
|
|
402
|
+
export function attrTag<
|
|
403
|
+
Name extends string,
|
|
404
|
+
AttrTags extends readonly { [K in Name]: unknown }[],
|
|
405
|
+
>(name: Name, ...attrTags: AttrTags): AttrTagsToAttrTag<Name, AttrTags>;
|
|
401
406
|
export function attrTagFor<Tag, Path extends readonly string[]>(
|
|
402
407
|
tag: Tag,
|
|
403
408
|
...path: Path
|
|
404
409
|
): <
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
410
|
+
Name extends string,
|
|
411
|
+
AttrTags extends [0] extends [1 & Tag]
|
|
412
|
+
? Record<Name, Marko.AttrTag<unknown>>
|
|
413
|
+
: Record<
|
|
414
|
+
Name,
|
|
415
|
+
Tag extends Marko.Input<infer Input>
|
|
416
|
+
? [0] extends [1 & Input]
|
|
417
|
+
? Marko.AttrTag<unknown>
|
|
418
|
+
: AttrTagValue<Input, Path>
|
|
419
|
+
: Marko.AttrTag<unknown>
|
|
420
|
+
>[],
|
|
412
421
|
>(
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
: any;
|
|
422
|
+
name: Name,
|
|
423
|
+
...attrTags: AttrTags
|
|
424
|
+
) => AttrTagsToAttrTag<Name, AttrTags>;
|
|
417
425
|
|
|
418
426
|
// TODO: this could be improved.
|
|
419
427
|
// currently falls back to DefaultRenderer too eagerly.
|
|
@@ -585,6 +593,17 @@ type MergeAttrTagValue<A, B> = A extends readonly (infer AType)[]
|
|
|
585
593
|
? A
|
|
586
594
|
: A | B;
|
|
587
595
|
|
|
596
|
+
type AttrTagsToAttrTag<
|
|
597
|
+
Name extends string,
|
|
598
|
+
AttrTags extends readonly unknown[],
|
|
599
|
+
> = AttrTags[number] extends infer AttrTag
|
|
600
|
+
? AttrTag extends { [K in Name]: Marko.AttrTag<infer Input> }
|
|
601
|
+
? [0] extends [1 & Input]
|
|
602
|
+
? never
|
|
603
|
+
: Marko.AttrTag<Input>
|
|
604
|
+
: never
|
|
605
|
+
: never;
|
|
606
|
+
|
|
588
607
|
type AttrTagByListSize<T, Item> = T extends
|
|
589
608
|
| readonly [any, ...any[]]
|
|
590
609
|
| readonly [...any[], any]
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/language-server",
|
|
3
3
|
"description": "Marko Language Server",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.23",
|
|
5
5
|
"bin": {
|
|
6
6
|
"marko-language-server": "./bin.js"
|
|
7
7
|
},
|
|
8
8
|
"bugs": "https://github.com/marko-js/language-server/issues/new?template=Bug_report.md",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@luxass/strip-json-comments": "^1.4.0",
|
|
11
|
-
"@marko/language-tools": "^2.5.
|
|
11
|
+
"@marko/language-tools": "^2.5.49",
|
|
12
12
|
"@marko/compiler": "^5.39.49",
|
|
13
13
|
"htmljs-parser": "^5.7.4",
|
|
14
14
|
"marko": "^5.38.18",
|