@weborigami/async-tree 0.2.6 → 0.2.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weborigami/async-tree",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Asynchronous tree drivers based on standard JavaScript classes",
5
5
  "type": "module",
6
6
  "main": "./main.js",
@@ -11,7 +11,7 @@
11
11
  "typescript": "5.7.2"
12
12
  },
13
13
  "dependencies": {
14
- "@weborigami/types": "0.2.6"
14
+ "@weborigami/types": "0.2.7"
15
15
  },
16
16
  "scripts": {
17
17
  "test": "node --test --test-reporter=spec",
@@ -13,6 +13,6 @@ export function keysFromPath(path: string): string[];
13
13
  export const naturalOrder: (a: string, b: string) => number;
14
14
  export function pathFromKeys(keys: string[]): string;
15
15
  export function pipeline(start: any, ...functions: Function[]): Promise<any>;
16
- export function setParent(child: any, parent: AsyncTree): void;
16
+ export function setParent(child: any, parent: AsyncTree|null): void;
17
17
  export function toPlainValue(object: any): Promise<any>;
18
18
  export function toString(object: any): string;
package/src/utilities.js CHANGED
@@ -5,6 +5,8 @@ import * as trailingSlash from "./trailingSlash.js";
5
5
  const textDecoder = new TextDecoder();
6
6
  const TypedArray = Object.getPrototypeOf(Uint8Array);
7
7
 
8
+ /** @typedef {import("@weborigami/types").AsyncTree} AsyncTree */
9
+
8
10
  /**
9
11
  * Return the value as an object. If the value is already an object it will be
10
12
  * returned as is. If the value is a primitive, it will be wrapped in an object:
@@ -244,7 +246,7 @@ export async function pipeline(start, ...fns) {
244
246
  * set the `symbols.parent` property.
245
247
  *
246
248
  * @param {*} child
247
- * @param {*} parent
249
+ * @param {AsyncTree|null} parent
248
250
  */
249
251
  export function setParent(child, parent) {
250
252
  if (Tree.isAsyncTree(child)) {