@spyglassmc/mcfunction 0.2.3 → 0.2.4
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/lib/completer/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as core from '@spyglassmc/core';
|
|
|
2
2
|
import type { McfunctionNode } from '../node/index.js';
|
|
3
3
|
import { CommandNode } from '../node/index.js';
|
|
4
4
|
import type { ArgumentTreeNode, RootTreeNode } from '../tree/index.js';
|
|
5
|
-
export
|
|
5
|
+
export type MockNodesGetter = (treeNode: ArgumentTreeNode, range: core.RangeLike) => core.Arrayable<core.AstNode>;
|
|
6
6
|
/**
|
|
7
7
|
* @param getMockNodes A function that returns a mock AST Node from given {@link ArgumentTreeNode}. These mock nodes
|
|
8
8
|
* will be used for completing the argument.
|
package/lib/parser/argument.d.ts
CHANGED
|
@@ -7,6 +7,6 @@ import type { ArgumentTreeNode } from '../tree/index.js';
|
|
|
7
7
|
*
|
|
8
8
|
* @returns The parser corresponding to that tree node, or `undefined` if such parser doesn't exist.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type ArgumentParserGetter = (treeNode: ArgumentTreeNode) => core.Parser | undefined;
|
|
11
11
|
export declare function argumentTreeNodeToString(name: string, treeNode: ArgumentTreeNode): string;
|
|
12
12
|
//# sourceMappingURL=argument.d.ts.map
|
package/lib/tree/type.d.ts
CHANGED
|
@@ -22,11 +22,11 @@ export interface LiteralTreeNode extends BaseTreeNode {
|
|
|
22
22
|
export interface RootTreeNode extends BaseTreeNode {
|
|
23
23
|
type: 'root';
|
|
24
24
|
}
|
|
25
|
-
export
|
|
26
|
-
|
|
25
|
+
export type TreeNode = ArgumentTreeNode | LiteralTreeNode | RootTreeNode;
|
|
26
|
+
type RecursivePartial<T> = T extends object ? {
|
|
27
27
|
[K in keyof T]?: RecursivePartial<T[K]>;
|
|
28
28
|
} : T;
|
|
29
|
-
export
|
|
30
|
-
export
|
|
29
|
+
export type PartialTreeNode = RecursivePartial<TreeNode>;
|
|
30
|
+
export type PartialRootTreeNode = RecursivePartial<RootTreeNode>;
|
|
31
31
|
export {};
|
|
32
32
|
//# sourceMappingURL=type.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spyglassmc/mcfunction",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"url": "https://github.com/SpyglassMC/Spyglass/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@spyglassmc/core": "0.4.
|
|
29
|
-
"@spyglassmc/locales": "0.3.
|
|
28
|
+
"@spyglassmc/core": "0.4.2",
|
|
29
|
+
"@spyglassmc/locales": "0.3.2"
|
|
30
30
|
}
|
|
31
31
|
}
|