@depthbomb/common 1.3.0 → 1.3.1

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/index.d.cts CHANGED
@@ -4,5 +4,5 @@ import { once } from "./fn.cjs";
4
4
  import { lazy, lazyAsync, resettableLazy } from "./lazy.cjs";
5
5
  import { Queue } from "./queue.cjs";
6
6
  import { Awaitable, Maybe, Nullable, assume, cast, typedEntries } from "./types.cjs";
7
- import { URLLike, URLPath } from "./urllib.cjs";
8
- export { Awaitable, Maybe, Nullable, Queue, URLLike, URLPath, allSettledSuccessful, assume, cache, cast, lazy, lazyAsync, once, pollUntil, rejectionTimeout, resettableLazy, sequential, timeout, typedEntries, withTimeout };
7
+ import { QueryObject, QueryValue, URLLike, URLPath } from "./urllib.cjs";
8
+ export { Awaitable, Maybe, Nullable, QueryObject, QueryValue, Queue, URLLike, URLPath, allSettledSuccessful, assume, cache, cast, lazy, lazyAsync, once, pollUntil, rejectionTimeout, resettableLazy, sequential, timeout, typedEntries, withTimeout };
package/dist/index.d.mts CHANGED
@@ -4,5 +4,5 @@ import { once } from "./fn.mjs";
4
4
  import { lazy, lazyAsync, resettableLazy } from "./lazy.mjs";
5
5
  import { Queue } from "./queue.mjs";
6
6
  import { Awaitable, Maybe, Nullable, assume, cast, typedEntries } from "./types.mjs";
7
- import { URLLike, URLPath } from "./urllib.mjs";
8
- export { Awaitable, Maybe, Nullable, Queue, URLLike, URLPath, allSettledSuccessful, assume, cache, cast, lazy, lazyAsync, once, pollUntil, rejectionTimeout, resettableLazy, sequential, timeout, typedEntries, withTimeout };
7
+ import { QueryObject, QueryValue, URLLike, URLPath } from "./urllib.mjs";
8
+ export { Awaitable, Maybe, Nullable, QueryObject, QueryValue, Queue, URLLike, URLPath, allSettledSuccessful, assume, cache, cast, lazy, lazyAsync, once, pollUntil, rejectionTimeout, resettableLazy, sequential, timeout, typedEntries, withTimeout };
package/dist/urllib.d.cts CHANGED
@@ -1,5 +1,7 @@
1
1
  //#region src/urllib.d.ts
2
2
  type URLLike = string | URL | URLPath;
3
+ type QueryValue = string | number | undefined | null | boolean | Array<QueryValue> | Record<string, any>;
4
+ type QueryObject = Record<string, QueryValue | QueryValue[]>;
3
5
  declare class URLPath {
4
6
  #private;
5
7
  constructor(input: URLLike, base?: URLLike);
@@ -22,7 +24,7 @@ declare class URLPath {
22
24
  joinpath(...segments: string[]): URLPath;
23
25
  div(...segments: string[]): URLPath;
24
26
  private withPath;
25
- withQuery(params: Record<string, string | number | boolean | null | undefined>): URLPath;
27
+ withQuery(params: QueryObject): URLPath;
26
28
  withoutQuery(...keys: string[]): URLPath;
27
29
  withHash(hash: string): URLPath;
28
30
  withoutHash(): URLPath;
@@ -37,4 +39,4 @@ declare class URLPath {
37
39
  static parse(input: string): URLPath;
38
40
  }
39
41
  //#endregion
40
- export { URLLike, URLPath };
42
+ export { QueryObject, QueryValue, URLLike, URLPath };
package/dist/urllib.d.mts CHANGED
@@ -1,5 +1,7 @@
1
1
  //#region src/urllib.d.ts
2
2
  type URLLike = string | URL | URLPath;
3
+ type QueryValue = string | number | undefined | null | boolean | Array<QueryValue> | Record<string, any>;
4
+ type QueryObject = Record<string, QueryValue | QueryValue[]>;
3
5
  declare class URLPath {
4
6
  #private;
5
7
  constructor(input: URLLike, base?: URLLike);
@@ -22,7 +24,7 @@ declare class URLPath {
22
24
  joinpath(...segments: string[]): URLPath;
23
25
  div(...segments: string[]): URLPath;
24
26
  private withPath;
25
- withQuery(params: Record<string, string | number | boolean | null | undefined>): URLPath;
27
+ withQuery(params: QueryObject): URLPath;
26
28
  withoutQuery(...keys: string[]): URLPath;
27
29
  withHash(hash: string): URLPath;
28
30
  withoutHash(): URLPath;
@@ -37,4 +39,4 @@ declare class URLPath {
37
39
  static parse(input: string): URLPath;
38
40
  }
39
41
  //#endregion
40
- export { URLLike, URLPath };
42
+ export { QueryObject, QueryValue, URLLike, URLPath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depthbomb/common",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "A set of common utilities for TypeScript/JavaScript",
5
5
  "license": "MIT",
6
6
  "engines": {