@sorrell/utilities 1.2.0 → 1.2.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.
@@ -4,8 +4,8 @@
4
4
  * @copyright (c) 2026 Gage Sorrell
5
5
  * @license MIT
6
6
  */
7
- import type * as TypeScript from "typescript";
8
7
  import type { NoOptions } from "./Utility.Internal.cjs";
8
+ import type TypeScript from "typescript";
9
9
  /**
10
10
  * @deprecated Use {@link TMutable} instead.
11
11
  *
@@ -39,12 +39,6 @@ export type TMutable<RecordLike, ShallowOption extends boolean = true> = Shallow
39
39
  * @template RecordLike - The record-like type from which this type extracts value types.
40
40
  */
41
41
  export type TValues<RecordLike> = RecordLike[keyof RecordLike];
42
- /**
43
- * The union of a given {@link ElementType} and the array of a given {@link ElementType}.
44
- *
45
- * @template ElementType - The type of this, or the type of elements contained by this.
46
- */
47
- export type TMaybeArray<ElementType> = ElementType | Array<ElementType>;
48
42
  /**
49
43
  * The element type of the return value of `Object.entries()`.
50
44
  *
@@ -69,6 +63,7 @@ export type NoOptions = typeof NoOptions;
69
63
  */
70
64
  export type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;
71
65
  export type TNullable<Type> = Type | null | undefined;
66
+ /** An error that is thrown in default implementations of `abstract` `class`es. */
72
67
  export declare class AbstractMethodCallError extends Error {
73
68
  constructor(ClassName?: string);
74
69
  }
@@ -95,6 +90,15 @@ type FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverri
95
90
  type JsxEmit = "none" | "preserve" | "react-native" | "react" | "react-jsx" | "react-jsxdev";
96
91
  type FModuleKind = "none" | "commonjs" | "amd" | "umd" | "system" | "es6" | "es2015" | "es2020" | "es2022" | "esnext" | "node16" | "node18" | "node20" | "nodenext" | "preserve";
97
92
  type FModuleResolutionKind = "classic" | "node" | "node" | "node10" | "node16" | "nodenext" | "bundler";
98
- export type FTarget = "es3" | "es5" | "es6" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "es2023" | "es2024" | "es2025" | "esnext" | "json" | "esnext" | "es2025";
93
+ type FTarget = "es3" | "es5" | "es6" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "es2023" | "es2024" | "es2025" | "esnext" | "json" | "esnext" | "es2025";
94
+ /**
95
+ * Maps a given {@link RecordLike} type to an identical {@link Record} type, but
96
+ * the properties are wrapped with {@link NonNullable}.
97
+ *
98
+ * @template RecordLike - The `Record`-like type from which this type is defined.
99
+ */
100
+ export type TRecordNonNullable<RecordLike> = {
101
+ [Key in keyof RecordLike]: NonNullable<RecordLike[Key]>;
102
+ };
99
103
  export {};
100
104
  //# sourceMappingURL=Utility.Types.d.cts.map
@@ -6,5 +6,5 @@
6
6
  "../../../Source/Miscellaneous/Utility.Types.ts"
7
7
  ],
8
8
  "names": [],
9
- "mappings": "AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,UAAU,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,CAAC,UAAU,IACjC;IACI,CAAC,UAAW,GAAG,IAAI,MAAM,UAAU,GAAI,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;CACzE,CAAC;AAEN;;;;;;;;;GASG;AACH,MAAM,MAAM,QAAQ,CAAC,UAAU,EAAE,aAAa,SAAS,OAAO,GAAG,IAAI,IACjE,aAAa,SAAS,KAAK,GACrB;IACE,CAAC,UAAW,GAAG,IAAI,MAAM,UAAU,GAAI,UAAU,CAAC,GAAG,CAAC;CACzD,GACC,aAAa,SAAS,IAAI,GACtB;IACE,CAAC,UAAW,GAAG,IAAI,MAAM,UAAU,GAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;CACnE,GACC,KAAK,CAAC;AAEpB;;;;;GAKG;AACH,MAAM,MAAM,OAAO,CA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,GACR,MAAM,GACN,QAAQ,GACR,QAAQ,CAAC;AAEf;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,CAAC,UAAU,IACrC;KACM,GAAG,IAAI,MAAM,UAAU,GAAI,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;CAC5D,CAAC"
10
10
  }
@@ -4,8 +4,8 @@
4
4
  * @copyright (c) 2026 Gage Sorrell
5
5
  * @license MIT
6
6
  */
7
- import type * as TypeScript from "typescript";
8
7
  import type { NoOptions } from "./Utility.Internal.mjs";
8
+ import type TypeScript from "typescript";
9
9
  /**
10
10
  * @deprecated Use {@link TMutable} instead.
11
11
  *
@@ -39,12 +39,6 @@ export type TMutable<RecordLike, ShallowOption extends boolean = true> = Shallow
39
39
  * @template RecordLike - The record-like type from which this type extracts value types.
40
40
  */
41
41
  export type TValues<RecordLike> = RecordLike[keyof RecordLike];
42
- /**
43
- * The union of a given {@link ElementType} and the array of a given {@link ElementType}.
44
- *
45
- * @template ElementType - The type of this, or the type of elements contained by this.
46
- */
47
- export type TMaybeArray<ElementType> = ElementType | Array<ElementType>;
48
42
  /**
49
43
  * The element type of the return value of `Object.entries()`.
50
44
  *
@@ -69,6 +63,7 @@ export type NoOptions = typeof NoOptions;
69
63
  */
70
64
  export type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;
71
65
  export type TNullable<Type> = Type | null | undefined;
66
+ /** An error that is thrown in default implementations of `abstract` `class`es. */
72
67
  export declare class AbstractMethodCallError extends Error {
73
68
  constructor(ClassName?: string);
74
69
  }
@@ -95,6 +90,15 @@ type FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverri
95
90
  type JsxEmit = "none" | "preserve" | "react-native" | "react" | "react-jsx" | "react-jsxdev";
96
91
  type FModuleKind = "none" | "commonjs" | "amd" | "umd" | "system" | "es6" | "es2015" | "es2020" | "es2022" | "esnext" | "node16" | "node18" | "node20" | "nodenext" | "preserve";
97
92
  type FModuleResolutionKind = "classic" | "node" | "node" | "node10" | "node16" | "nodenext" | "bundler";
98
- export type FTarget = "es3" | "es5" | "es6" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "es2023" | "es2024" | "es2025" | "esnext" | "json" | "esnext" | "es2025";
93
+ type FTarget = "es3" | "es5" | "es6" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "es2023" | "es2024" | "es2025" | "esnext" | "json" | "esnext" | "es2025";
94
+ /**
95
+ * Maps a given {@link RecordLike} type to an identical {@link Record} type, but
96
+ * the properties are wrapped with {@link NonNullable}.
97
+ *
98
+ * @template RecordLike - The `Record`-like type from which this type is defined.
99
+ */
100
+ export type TRecordNonNullable<RecordLike> = {
101
+ [Key in keyof RecordLike]: NonNullable<RecordLike[Key]>;
102
+ };
99
103
  export {};
100
104
  //# sourceMappingURL=Utility.Types.d.mts.map
@@ -6,5 +6,5 @@
6
6
  "../../../Source/Miscellaneous/Utility.Types.ts"
7
7
  ],
8
8
  "names": [],
9
- "mappings": "AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,UAAU,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,CAAC,UAAU,IACjC;IACI,CAAC,UAAW,GAAG,IAAI,MAAM,UAAU,GAAI,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;CACzE,CAAC;AAEN;;;;;;;;;GASG;AACH,MAAM,MAAM,QAAQ,CAAC,UAAU,EAAE,aAAa,SAAS,OAAO,GAAG,IAAI,IACjE,aAAa,SAAS,KAAK,GACrB;IACE,CAAC,UAAW,GAAG,IAAI,MAAM,UAAU,GAAI,UAAU,CAAC,GAAG,CAAC;CACzD,GACC,aAAa,SAAS,IAAI,GACtB;IACE,CAAC,UAAW,GAAG,IAAI,MAAM,UAAU,GAAI,QAAQ,CAAC,UAAU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R,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,QAAQ,CAAC;AAEf;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,CAAC,UAAU,IACrC;KACM,GAAG,IAAI,MAAM,UAAU,GAAI,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;CAC5D,CAAC"
10
10
  }
@@ -4,8 +4,8 @@
4
4
  * @copyright (c) 2026 Gage Sorrell
5
5
  * @license MIT
6
6
  */
7
- import type * as TypeScript from "typescript";
8
7
  import type { NoOptions } from "./Utility.Internal.ts";
8
+ import type TypeScript from "typescript";
9
9
  /**
10
10
  * @deprecated Use {@link TMutable} instead.
11
11
  *
@@ -39,12 +39,6 @@ export type TMutable<RecordLike, ShallowOption extends boolean = true> = Shallow
39
39
  * @template RecordLike - The record-like type from which this type extracts value types.
40
40
  */
41
41
  export type TValues<RecordLike> = RecordLike[keyof RecordLike];
42
- /**
43
- * The union of a given {@link ElementType} and the array of a given {@link ElementType}.
44
- *
45
- * @template ElementType - The type of this, or the type of elements contained by this.
46
- */
47
- export type TMaybeArray<ElementType> = ElementType | Array<ElementType>;
48
42
  /**
49
43
  * The element type of the return value of `Object.entries()`.
50
44
  *
@@ -69,6 +63,7 @@ export type NoOptions = typeof NoOptions;
69
63
  */
70
64
  export type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;
71
65
  export type TNullable<Type> = Type | null | undefined;
66
+ /** An error that is thrown in default implementations of `abstract` `class`es. */
72
67
  export declare class AbstractMethodCallError extends Error {
73
68
  constructor(ClassName?: string);
74
69
  }
@@ -95,6 +90,15 @@ type FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverri
95
90
  type JsxEmit = "none" | "preserve" | "react-native" | "react" | "react-jsx" | "react-jsxdev";
96
91
  type FModuleKind = "none" | "commonjs" | "amd" | "umd" | "system" | "es6" | "es2015" | "es2020" | "es2022" | "esnext" | "node16" | "node18" | "node20" | "nodenext" | "preserve";
97
92
  type FModuleResolutionKind = "classic" | "node" | "node" | "node10" | "node16" | "nodenext" | "bundler";
98
- export type FTarget = "es3" | "es5" | "es6" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "es2023" | "es2024" | "es2025" | "esnext" | "json" | "esnext" | "es2025";
93
+ type FTarget = "es3" | "es5" | "es6" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "es2023" | "es2024" | "es2025" | "esnext" | "json" | "esnext" | "es2025";
94
+ /**
95
+ * Maps a given {@link RecordLike} type to an identical {@link Record} type, but
96
+ * the properties are wrapped with {@link NonNullable}.
97
+ *
98
+ * @template RecordLike - The `Record`-like type from which this type is defined.
99
+ */
100
+ export type TRecordNonNullable<RecordLike> = {
101
+ [Key in keyof RecordLike]: NonNullable<RecordLike[Key]>;
102
+ };
99
103
  export {};
100
104
  //# sourceMappingURL=Utility.Types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Utility.Types.d.ts","sourceRoot":"","sources":["../../../Source/Miscellaneous/Utility.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,UAAU,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,CAAC,UAAU,IACjC;IACI,CAAC,UAAW,GAAG,IAAI,MAAM,UAAU,GAAI,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;CACzE,CAAC;AAEN;;;;;;;;;GASG;AACH,MAAM,MAAM,QAAQ,CAAC,UAAU,EAAE,aAAa,SAAS,OAAO,GAAG,IAAI,IACjE,aAAa,SAAS,KAAK,GACrB;IACE,CAAC,UAAW,GAAG,IAAI,MAAM,UAAU,GAAI,UAAU,CAAC,GAAG,CA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,SAAS,GACT,MAAM,GACN,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,SAAS,CAAC;AAEhB,KAAK,OAAO,GACN,KAAK,GACL,KAAK,GACL,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,QAAQ,CAAC;AAEf;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,CAAC,UAAU,IACrC;KACM,GAAG,IAAI,MAAM,UAAU,GAAI,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;CAC5D,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../Source/Async/index.ts", "../Source/Miscellaneous/Utility.Types.ts", "../Source/Async/Async.ts"],
4
- "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Async.ts\";\nexport * from \"./Async.Types.ts\";\n", "/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type * as TypeScript from \"typescript\";\nimport type { NoOptions } from \"./Utility.Internal.ts\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The union of a given {@link ElementType} and the array of a given {@link ElementType}.\n *\n * @template ElementType - The type of this, or the type of elements contained by this.\n */\nexport type TMaybeArray<ElementType> = ElementType | Array<ElementType>;\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\nexport type FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n", "/**\n * @file Async.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { AbstractMethodCallError, type TNullable } from \"../Miscellaneous/Utility.Types.ts\";\nimport type { TOnFulfilled, TOnRejected, TPromiseCtorArgument, TTryResult, TTrySource } from \"./Async.Types.ts\";\nimport type { TFunction } from \"../Functional/Functional.Types.ts\";\n/**\n * Implements \"Errors-as-values\" for `async` functions and `Promise<DataType>`s.\n *\n * If the `async` function or `Promise<DataType>` returns/resolves, then the `Error`\n * property of the returned object will be `undefined`, and the result of the\n * `async` function or `Promise<DataType>` will reside in the `Data` property of the\n * returned object.\n *\n * Similarly, if the `async` function or `Promise<DataType>` throws, then the `Data`\n * property of the returned object is `undefined`, and the `Error` property is what\n * was thrown to the `catch` block.\n *\n * @template DataType - The type of the data that the `async` function or `Promise<DataType>`.\n * @param Source - The `async` function or `Promise` to evaluate.\n *\n * @returns {TTryResult<DataType>} A {@link TTryResult} containing either the result\n * ({@link TTryResult.Data}) or error {@link TTryResult.Error}.\n *\n * @example\n * // With an `async` function,\n * async function GetName(): Promise<string> { ... }\n * // Or, with a `Promise`,\n * const GetName: Promise<string> = new Promise<string>(...);\n *\n * // For both of the above cases, `Try` behaves the same:\n * const { Data: Name, Error: NameError } = await Try(GetName);\n * // If `GetName` returned,\n * // `typeof Name` <- `\"string\"`\n * // `typeof NameError` <- `\"undefined\"`\n * // If `GetName` threw,\n * // `typeof Name` <- `\"undefined\"`\n * // `NameError !== undefined` <- `true` (Unless `GetName` threw `undefined`).\n */\nexport async function Try<DataType>(Source: TTrySource<DataType>): Promise<TTryResult<DataType>> {\n try {\n const Data: DataType = typeof Source === \"function\"\n ? await Source()\n : await Source;\n return {\n Data,\n Error: undefined\n };\n }\n catch (ErrorValue: unknown) {\n return {\n Data: undefined,\n Error: ErrorValue\n };\n }\n}\n/**\n * A cleaner way of using `Array.prototype.map` with an `async` function.\n *\n * @template ArgumentElementType - The type of the given {@link Elements}.\n * @template ReturnElementType - The type of the `Array` returned by this.\n *\n * @param Elements - The `Array` that will be transformed.\n * @param Mapper - The function that maps each {@link ArgumentElementType}\n * to a {@link ReturnElementType}.\n *\n * @returns {Array<ReturnElementType>} An `Array` of {@link ReturnElementType}.\n *\n * @example\n * In an `async` function,\n * ```typescript\n * const ArgumentElements: Array<ArgumentElementType> = [ ... ];\n * const ToReturnElement = async (Element: ArgumentElementType): Promise<ReturnElementType> => ...;\n * const ReturnElements: Array<ReturnElementType> = await Map(ArgumentElements, ToReturnElement);\n * ```\n */\nexport async function Map<ArgumentElementType, ReturnElementType>(Elements: Array<ArgumentElementType>, Mapper: ((Element: ArgumentElementType) => Promise<ReturnElementType>)): Promise<Array<ReturnElementType>> {\n const MapperWrapped = async (Element: ArgumentElementType): Promise<ReturnElementType> => {\n return Mapper(Element);\n };\n const Out: Array<Promise<ReturnElementType>> = Elements.map(MapperWrapped);\n return await Promise.all(Out);\n}\n/**\n * An abstract implementation of {@link PromiseLike}. This exists only to maintain the\n * project's naming convention.\n */\nexport abstract class TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public then<ResultType = ResolveType, RejectType = never>(_OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, _OnRejected?: TOnRejected<RejectType>): TPromiseLike<ResultType | RejectType> {\n throw new AbstractMethodCallError(\"TPromiseLike\");\n }\n}\n/**\n * The {@link TypeError} that is thrown by the constructor of {@link TPromise}\n * iff it receives an argument that is not a {@link TPromiseCtorArgument}.\n * It does not provide any additional information (in particular, it does not\n * add any properties, and it does not set any properties inherited from\n * {@link TypeError}).\n *\n * @note While the argument type of {@link TPromise}'s constructor is checked at runtime,\n * the type checker should prevent the error described by this from happening.\n */\nexport class FPromiseInstantiationError extends TypeError {\n public constructor() {\n super();\n }\n}\n/**\n * A `then`-able wrapper of {@link Promise}.\n *\n * @template ResolveType - The type to which this resolves, if it does resolve.\n */\nexport class TPromise<ResolveType> extends TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public constructor(Argument: TPromiseCtorArgument<ResolveType>) {\n super();\n if (typeof Argument === \"function\") {\n this.Underlying = new Promise<ResolveType>(Argument);\n }\n else {\n if (Argument instanceof TPromise) {\n this.Underlying = Argument.Raw();\n }\n else if (Argument instanceof Promise) {\n this.Underlying = Argument;\n }\n }\n throw new FPromiseInstantiationError();\n }\n private readonly Underlying: Promise<ResolveType>;\n /**\n * This class's extension of {@link Promise!then}.\n *\n * @template ResultType - The type to which the value underlying the {@link TPromise} returned by this\n * will resolve, if the {@link TPromise} resolves.\n *\n * @template RejectType - The type to which the value underlying the {@link TPromise} returned by this\n * will reject, if the {@link TPromise} rejects.\n *\n * @param OnFulfilled - The callback that is called when the underlying {@link Promise} resolves,\n * if it resolves.\n *\n * @param OnRejected - The callback that is called when the underlying {@link Promise} rejects,\n * if it rejects.\n *\n * @returns {TPromise<ResultType | RejectType>} A new {@link TPromise} of the result of the\n * given callbacks.\n *\n * @example\n * ```typescript\n * const Example: TPromise<string> = new TPromise<string>((Resolve, Reject) =>\n * {\n * if (Math.random() < 0.5)\n * {\n * Resolve(\"Success\");\n * }\n * else\n * {\n * Reject(\"Error\");\n * }\n * });\n *\n * Example.then(\n * (Value: string): void =>\n * {\n * // `Value` <- `\"Success\"`\n * },\n * (Reason: unknown): void =>\n * {\n * // `Reason` <- `\"Error\"`\n * }\n * );\n * ```\n */\n public Then<ResultType = ResolveType, RejectType = never>(OnFulfilled: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public override then<ResultType = ResolveType, RejectType = never>(OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public Catch<ResultType = never>(OnRejected?: TNullable<TOnRejected<ResolveType>>): TPromiseLike<ResolveType | ResultType> {\n return new TPromise<ResolveType | ResultType>(this.Underlying.catch(OnRejected));\n }\n public Finally(OnFinally?: TNullable<TFunction>): TPromise<ResolveType> {\n return new TPromise(this.Underlying.finally(OnFinally));\n }\n public static Resolve<ResolveType>(Value: ResolveType | PromiseLike<ResolveType>): TPromise<Awaited<ResolveType>> {\n return new TPromise(Promise.resolve(Value));\n }\n public static Reject<ResolveType = unknown>(Reason?: unknown): TPromise<ResolveType> {\n return new TPromise(Promise.reject<ResolveType>(Reason));\n }\n public Raw(): Promise<ResolveType> {\n return this.Underlying;\n }\n}\n;\n"],
5
- "mappings": ";;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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA8CO,KAAmD,aAAoD,YAAyE;AACnL,WAAO,IAAI,UAAkC,KAAK,WAAW,KAAK,aAAa,UAAU,CAAC;AAAA,EAC9F;AAAA,EACgB,KAAmD,aAAqD,YAAyE;AAC7L,WAAO,IAAI,UAAkC,KAAK,WAAW,KAAK,aAAa,UAAU,CAAC;AAAA,EAC9F;AAAA,EACO,MAA0B,YAA0F;AACvH,WAAO,IAAI,UAAmC,KAAK,WAAW,MAAM,UAAU,CAAC;AAAA,EACnF;AAAA,EACO,QAAQ,WAAyD;AACpE,WAAO,IAAI,UAAS,KAAK,WAAW,QAAQ,SAAS,CAAC;AAAA,EAC1D;AAAA,EACA,OAAc,QAAqB,OAA+E;AAC9G,WAAO,IAAI,UAAS,QAAQ,QAAQ,KAAK,CAAC;AAAA,EAC9C;AAAA,EACA,OAAc,OAA8B,QAAyC;AACjF,WAAO,IAAI,UAAS,QAAQ,OAAoB,MAAM,CAAC;AAAA,EAC3D;AAAA,EACO,MAA4B;AAC/B,WAAO,KAAK;AAAA,EAChB;AACJ;",
4
+ "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Async.ts\";\nexport * from \"./Async.Types.ts\";\n", "/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type { NoOptions } from \"./Utility.Internal.ts\";\nimport type TypeScript from \"typescript\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\n/** An error that is thrown in default implementations of `abstract` `class`es. */\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\ntype FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n/**\n * Maps a given {@link RecordLike} type to an identical {@link Record} type, but\n * the properties are wrapped with {@link NonNullable}.\n *\n * @template RecordLike - The `Record`-like type from which this type is defined.\n */\nexport type TRecordNonNullable<RecordLike> = {\n [Key in keyof RecordLike]: NonNullable<RecordLike[Key]>;\n};\n", "/**\n * @file Async.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { AbstractMethodCallError, type TNullable } from \"../Miscellaneous/Utility.Types.ts\";\nimport type { TOnFulfilled, TOnRejected, TPromiseCtorArgument, TTryResult, TTrySource } from \"./Async.Types.ts\";\nimport type { TFunction } from \"../Functional/Functional.Types.ts\";\n/**\n * Implements \"Errors-as-values\" for `async` functions and `Promise<DataType>`s.\n *\n * If the `async` function or `Promise<DataType>` returns/resolves, then the `Error`\n * property of the returned object will be `undefined`, and the result of the\n * `async` function or `Promise<DataType>` will reside in the `Data` property of the\n * returned object.\n *\n * Similarly, if the `async` function or `Promise<DataType>` throws, then the `Data`\n * property of the returned object is `undefined`, and the `Error` property is what\n * was thrown to the `catch` block.\n *\n * @template DataType - The type of the data that the `async` function or `Promise<DataType>`.\n * @param Source - The `async` function or `Promise` to evaluate.\n *\n * @returns {TTryResult<DataType>} A {@link TTryResult} containing either the result\n * ({@link TTryResult.Data}) or error {@link TTryResult.Error}.\n *\n * @example\n * // With an `async` function,\n * async function GetName(): Promise<string> { ... }\n * // Or, with a `Promise`,\n * const GetName: Promise<string> = new Promise<string>(...);\n *\n * // For both of the above cases, `Try` behaves the same:\n * const { Data: Name, Error: NameError } = await Try(GetName);\n * // If `GetName` returned,\n * // `typeof Name` <- `\"string\"`\n * // `typeof NameError` <- `\"undefined\"`\n * // If `GetName` threw,\n * // `typeof Name` <- `\"undefined\"`\n * // `NameError !== undefined` <- `true` (Unless `GetName` threw `undefined`).\n */\nexport async function Try<DataType>(Source: TTrySource<DataType>): Promise<TTryResult<DataType>> {\n try {\n const Data: DataType = typeof Source === \"function\"\n ? await Source()\n : await Source;\n return {\n Data,\n Error: undefined\n };\n }\n catch (ErrorValue: unknown) {\n return {\n Data: undefined,\n Error: ErrorValue\n };\n }\n}\n/**\n * A cleaner way of using `Array.prototype.map` with an `async` function.\n *\n * @template ArgumentElementType - The type of the given {@link Elements}.\n * @template ReturnElementType - The type of the `Array` returned by this.\n *\n * @param Elements - The `Array` that will be transformed.\n * @param Mapper - The function that maps each {@link ArgumentElementType}\n * to a {@link ReturnElementType}.\n *\n * @returns {Array<ReturnElementType>} An `Array` of {@link ReturnElementType}.\n *\n * @example\n * In an `async` function,\n * ```typescript\n * const ArgumentElements: Array<ArgumentElementType> = [ ... ];\n * const ToReturnElement = async (Element: ArgumentElementType): Promise<ReturnElementType> => ...;\n * const ReturnElements: Array<ReturnElementType> = await Map(ArgumentElements, ToReturnElement);\n * ```\n */\nexport async function Map<ArgumentElementType, ReturnElementType>(Elements: Array<ArgumentElementType>, Mapper: ((Element: ArgumentElementType) => Promise<ReturnElementType>)): Promise<Array<ReturnElementType>> {\n const MapperWrapped = async (Element: ArgumentElementType): Promise<ReturnElementType> => {\n return Mapper(Element);\n };\n const Out: Array<Promise<ReturnElementType>> = Elements.map(MapperWrapped);\n return await Promise.all(Out);\n}\n/**\n * An abstract implementation of {@link PromiseLike}. This exists only to maintain the\n * project's naming convention.\n */\nexport abstract class TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public then<ResultType = ResolveType, RejectType = never>(_OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, _OnRejected?: TOnRejected<RejectType>): TPromiseLike<ResultType | RejectType> {\n throw new AbstractMethodCallError(\"TPromiseLike\");\n }\n}\n/**\n * The {@link TypeError} that is thrown by the constructor of {@link TPromise}\n * iff it receives an argument that is not a {@link TPromiseCtorArgument}.\n * It does not provide any additional information (in particular, it does not\n * add any properties, and it does not set any properties inherited from\n * {@link TypeError}).\n *\n * @note While the argument type of {@link TPromise}'s constructor is checked at runtime,\n * the type checker should prevent the error described by this from happening.\n */\nexport class FPromiseInstantiationError extends TypeError {\n public constructor() {\n super();\n }\n}\n/**\n * A `then`-able wrapper of {@link Promise}.\n *\n * @template ResolveType - The type to which this resolves, if it does resolve.\n */\nexport class TPromise<ResolveType> extends TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public constructor(Argument: TPromiseCtorArgument<ResolveType>) {\n super();\n if (typeof Argument === \"function\") {\n this.Underlying = new Promise<ResolveType>(Argument);\n }\n else {\n if (Argument instanceof TPromise) {\n this.Underlying = Argument.Raw();\n }\n else if (Argument instanceof Promise) {\n this.Underlying = Argument;\n }\n }\n throw new FPromiseInstantiationError();\n }\n private readonly Underlying: Promise<ResolveType>;\n /**\n * This class's extension of {@link Promise!then}.\n *\n * @template ResultType - The type to which the value underlying the {@link TPromise} returned by this\n * will resolve, if the {@link TPromise} resolves.\n *\n * @template RejectType - The type to which the value underlying the {@link TPromise} returned by this\n * will reject, if the {@link TPromise} rejects.\n *\n * @param OnFulfilled - The callback that is called when the underlying {@link Promise} resolves,\n * if it resolves.\n *\n * @param OnRejected - The callback that is called when the underlying {@link Promise} rejects,\n * if it rejects.\n *\n * @returns {TPromise<ResultType | RejectType>} A new {@link TPromise} of the result of the\n * given callbacks.\n *\n * @example\n * ```typescript\n * const Example: TPromise<string> = new TPromise<string>((Resolve, Reject) =>\n * {\n * if (Math.random() < 0.5)\n * {\n * Resolve(\"Success\");\n * }\n * else\n * {\n * Reject(\"Error\");\n * }\n * });\n *\n * Example.then(\n * (Value: string): void =>\n * {\n * // `Value` <- `\"Success\"`\n * },\n * (Reason: unknown): void =>\n * {\n * // `Reason` <- `\"Error\"`\n * }\n * );\n * ```\n */\n public Then<ResultType = ResolveType, RejectType = never>(OnFulfilled: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public override then<ResultType = ResolveType, RejectType = never>(OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public Catch<ResultType = never>(OnRejected?: TNullable<TOnRejected<ResolveType>>): TPromiseLike<ResolveType | ResultType> {\n return new TPromise<ResolveType | ResultType>(this.Underlying.catch(OnRejected));\n }\n public Finally(OnFinally?: TNullable<TFunction>): TPromise<ResolveType> {\n return new TPromise(this.Underlying.finally(OnFinally));\n }\n public static Resolve<ResolveType>(Value: ResolveType | PromiseLike<ResolveType>): TPromise<Awaited<ResolveType>> {\n return new TPromise(Promise.resolve(Value));\n }\n public static Reject<ResolveType = unknown>(Reason?: unknown): TPromise<ResolveType> {\n return new TPromise(Promise.reject<ResolveType>(Reason));\n }\n public Raw(): Promise<ResolveType> {\n return this.Underlying;\n }\n}\n;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACqEO,IAAM,0BAAN,cAAsC,MAAM;AAAA,EACxC,YAAY,WAAoB;AACnC,UAAM,SAAS;AAAA,EACnB;AACJ;;;AC/BA,eAAsB,IAAc,QAA6D;AAC7F,MAAI;AACA,UAAM,OAAiB,OAAO,WAAW,aACnC,MAAM,OAAO,IACb,MAAM;AACZ,WAAO;AAAA,MACH;AAAA,MACA,OAAO;AAAA,IACX;AAAA,EACJ,SACO,YAAqB;AACxB,WAAO;AAAA,MACH,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,EACJ;AACJ;AAqBA,eAAsB,IAA4C,UAAsC,QAA2G;AAC/M,QAAM,gBAAgB,OAAO,YAA6D;AACtF,WAAO,OAAO,OAAO;AAAA,EACzB;AACA,QAAM,MAAyC,SAAS,IAAI,aAAa;AACzE,SAAO,MAAM,QAAQ,IAAI,GAAG;AAChC;AAKO,IAAe,eAAf,MAA6E;AAAA,EACzE,KAAmD,cAAsD,aAA8E;AAC1L,UAAM,IAAI,wBAAwB,cAAc;AAAA,EACpD;AACJ;AAWO,IAAM,6BAAN,cAAyC,UAAU;AAAA,EAC/C,cAAc;AACjB,UAAM;AAAA,EACV;AACJ;AAMO,IAAM,WAAN,MAAM,kBAA8B,aAA8D;AAAA,EAC9F,YAAY,UAA6C;AAC5D,UAAM;AACN,QAAI,OAAO,aAAa,YA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neous/Utility.Types.ts", "../Source/Async/Async.ts"],
4
- "sourcesContent": ["/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type * as TypeScript from \"typescript\";\nimport type { NoOptions } from \"./Utility.Internal.ts\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The union of a given {@link ElementType} and the array of a given {@link ElementType}.\n *\n * @template ElementType - The type of this, or the type of elements contained by this.\n */\nexport type TMaybeArray<ElementType> = ElementType | Array<ElementType>;\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\nexport type FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n", "/**\n * @file Async.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { AbstractMethodCallError, type TNullable } from \"../Miscellaneous/Utility.Types.ts\";\nimport type { TOnFulfilled, TOnRejected, TPromiseCtorArgument, TTryResult, TTrySource } from \"./Async.Types.ts\";\nimport type { TFunction } from \"../Functional/Functional.Types.ts\";\n/**\n * Implements \"Errors-as-values\" for `async` functions and `Promise<DataType>`s.\n *\n * If the `async` function or `Promise<DataType>` returns/resolves, then the `Error`\n * property of the returned object will be `undefined`, and the result of the\n * `async` function or `Promise<DataType>` will reside in the `Data` property of the\n * returned object.\n *\n * Similarly, if the `async` function or `Promise<DataType>` throws, then the `Data`\n * property of the returned object is `undefined`, and the `Error` property is what\n * was thrown to the `catch` block.\n *\n * @template DataType - The type of the data that the `async` function or `Promise<DataType>`.\n * @param Source - The `async` function or `Promise` to evaluate.\n *\n * @returns {TTryResult<DataType>} A {@link TTryResult} containing either the result\n * ({@link TTryResult.Data}) or error {@link TTryResult.Error}.\n *\n * @example\n * // With an `async` function,\n * async function GetName(): Promise<string> { ... }\n * // Or, with a `Promise`,\n * const GetName: Promise<string> = new Promise<string>(...);\n *\n * // For both of the above cases, `Try` behaves the same:\n * const { Data: Name, Error: NameError } = await Try(GetName);\n * // If `GetName` returned,\n * // `typeof Name` <- `\"string\"`\n * // `typeof NameError` <- `\"undefined\"`\n * // If `GetName` threw,\n * // `typeof Name` <- `\"undefined\"`\n * // `NameError !== undefined` <- `true` (Unless `GetName` threw `undefined`).\n */\nexport async function Try<DataType>(Source: TTrySource<DataType>): Promise<TTryResult<DataType>> {\n try {\n const Data: DataType = typeof Source === \"function\"\n ? await Source()\n : await Source;\n return {\n Data,\n Error: undefined\n };\n }\n catch (ErrorValue: unknown) {\n return {\n Data: undefined,\n Error: ErrorValue\n };\n }\n}\n/**\n * A cleaner way of using `Array.prototype.map` with an `async` function.\n *\n * @template ArgumentElementType - The type of the given {@link Elements}.\n * @template ReturnElementType - The type of the `Array` returned by this.\n *\n * @param Elements - The `Array` that will be transformed.\n * @param Mapper - The function that maps each {@link ArgumentElementType}\n * to a {@link ReturnElementType}.\n *\n * @returns {Array<ReturnElementType>} An `Array` of {@link ReturnElementType}.\n *\n * @example\n * In an `async` function,\n * ```typescript\n * const ArgumentElements: Array<ArgumentElementType> = [ ... ];\n * const ToReturnElement = async (Element: ArgumentElementType): Promise<ReturnElementType> => ...;\n * const ReturnElements: Array<ReturnElementType> = await Map(ArgumentElements, ToReturnElement);\n * ```\n */\nexport async function Map<ArgumentElementType, ReturnElementType>(Elements: Array<ArgumentElementType>, Mapper: ((Element: ArgumentElementType) => Promise<ReturnElementType>)): Promise<Array<ReturnElementType>> {\n const MapperWrapped = async (Element: ArgumentElementType): Promise<ReturnElementType> => {\n return Mapper(Element);\n };\n const Out: Array<Promise<ReturnElementType>> = Elements.map(MapperWrapped);\n return await Promise.all(Out);\n}\n/**\n * An abstract implementation of {@link PromiseLike}. This exists only to maintain the\n * project's naming convention.\n */\nexport abstract class TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public then<ResultType = ResolveType, RejectType = never>(_OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, _OnRejected?: TOnRejected<RejectType>): TPromiseLike<ResultType | RejectType> {\n throw new AbstractMethodCallError(\"TPromiseLike\");\n }\n}\n/**\n * The {@link TypeError} that is thrown by the constructor of {@link TPromise}\n * iff it receives an argument that is not a {@link TPromiseCtorArgument}.\n * It does not provide any additional information (in particular, it does not\n * add any properties, and it does not set any properties inherited from\n * {@link TypeError}).\n *\n * @note While the argument type of {@link TPromise}'s constructor is checked at runtime,\n * the type checker should prevent the error described by this from happening.\n */\nexport class FPromiseInstantiationError extends TypeError {\n public constructor() {\n super();\n }\n}\n/**\n * A `then`-able wrapper of {@link Promise}.\n *\n * @template ResolveType - The type to which this resolves, if it does resolve.\n */\nexport class TPromise<ResolveType> extends TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public constructor(Argument: TPromiseCtorArgument<ResolveType>) {\n super();\n if (typeof Argument === \"function\") {\n this.Underlying = new Promise<ResolveType>(Argument);\n }\n else {\n if (Argument instanceof TPromise) {\n this.Underlying = Argument.Raw();\n }\n else if (Argument instanceof Promise) {\n this.Underlying = Argument;\n }\n }\n throw new FPromiseInstantiationError();\n }\n private readonly Underlying: Promise<ResolveType>;\n /**\n * This class's extension of {@link Promise!then}.\n *\n * @template ResultType - The type to which the value underlying the {@link TPromise} returned by this\n * will resolve, if the {@link TPromise} resolves.\n *\n * @template RejectType - The type to which the value underlying the {@link TPromise} returned by this\n * will reject, if the {@link TPromise} rejects.\n *\n * @param OnFulfilled - The callback that is called when the underlying {@link Promise} resolves,\n * if it resolves.\n *\n * @param OnRejected - The callback that is called when the underlying {@link Promise} rejects,\n * if it rejects.\n *\n * @returns {TPromise<ResultType | RejectType>} A new {@link TPromise} of the result of the\n * given callbacks.\n *\n * @example\n * ```typescript\n * const Example: TPromise<string> = new TPromise<string>((Resolve, Reject) =>\n * {\n * if (Math.random() < 0.5)\n * {\n * Resolve(\"Success\");\n * }\n * else\n * {\n * Reject(\"Error\");\n * }\n * });\n *\n * Example.then(\n * (Value: string): void =>\n * {\n * // `Value` <- `\"Success\"`\n * },\n * (Reason: unknown): void =>\n * {\n * // `Reason` <- `\"Error\"`\n * }\n * );\n * ```\n */\n public Then<ResultType = ResolveType, RejectType = never>(OnFulfilled: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public override then<ResultType = ResolveType, RejectType = never>(OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public Catch<ResultType = never>(OnRejected?: TNullable<TOnRejected<ResolveType>>): TPromiseLike<ResolveType | ResultType> {\n return new TPromise<ResolveType | ResultType>(this.Underlying.catch(OnRejected));\n }\n public Finally(OnFinally?: TNullable<TFunction>): TPromise<ResolveType> {\n return new TPromise(this.Underlying.finally(OnFinally));\n }\n public static Resolve<ResolveType>(Value: ResolveType | PromiseLike<ResolveType>): TPromise<Awaited<ResolveType>> {\n return new TPromise(Promise.resolve(Value));\n }\n public static Reject<ResolveType = unknown>(Reason?: unknown): TPromise<ResolveType> {\n return new TPromise(Promise.reject<ResolveType>(Reason));\n }\n public Raw(): Promise<ResolveType> {\n return this.Underlying;\n }\n}\n;\n"],
5
- "mappings": ";AA0EO,IAAM,0BAAN,cAAsC,MAAM;AAAA,EACxC,YAAY,WAAoB;AACnC,UAAM,SAAS;AAAA,EACnB;AACJ;;;ACpCA,eAAsB,IAAc,QAA6D;AAC7F,MAAI;AACA,UAAM,OAAiB,OAAO,WAAW,aACnC,MAAM,OAAO,IACb,MAAM;AACZ,WAAO;AAAA,MACH;AAAA,MACA,OAAO;AAAA,IACX;AAAA,EACJ,SACO,YAAqB;AACxB,WAAO;AAAA,MACH,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,EACJ;AACJ;AAqBA,eAAsB,IAA4C,UAAsC,QAA2G;AAC/M,QAAM,gBAAgB,OAAO,YAA6D;AACtF,WAAO,OAAO,OAAO;AAAA,EACzB;AACA,QAAM,MAAyC,SAAS,IAAI,aAAa;AACzE,SAAO,MAAM,QAAQ,IAAI,GAAG;AAChC;AAKO,IAAe,eAAf,MAA6E;AAAA,EACzE,KAAmD,cAAsD,aAA8E;AAC1L,UAAM,IAAI,wBAAwB,cAAc;AAAA,EACpD;AACJ;AAWO,IAAM,6BAAN,cAAyC,UAAU;AAAA,E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;AAAA,EACO,MAA4B;AAC/B,WAAO,KAAK;AAAA,EAChB;AACJ;",
4
+ "sourcesContent": ["/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type { NoOptions } from \"./Utility.Internal.ts\";\nimport type TypeScript from \"typescript\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\n/** An error that is thrown in default implementations of `abstract` `class`es. */\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\ntype FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n/**\n * Maps a given {@link RecordLike} type to an identical {@link Record} type, but\n * the properties are wrapped with {@link NonNullable}.\n *\n * @template RecordLike - The `Record`-like type from which this type is defined.\n */\nexport type TRecordNonNullable<RecordLike> = {\n [Key in keyof RecordLike]: NonNullable<RecordLike[Key]>;\n};\n", "/**\n * @file Async.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { AbstractMethodCallError, type TNullable } from \"../Miscellaneous/Utility.Types.ts\";\nimport type { TOnFulfilled, TOnRejected, TPromiseCtorArgument, TTryResult, TTrySource } from \"./Async.Types.ts\";\nimport type { TFunction } from \"../Functional/Functional.Types.ts\";\n/**\n * Implements \"Errors-as-values\" for `async` functions and `Promise<DataType>`s.\n *\n * If the `async` function or `Promise<DataType>` returns/resolves, then the `Error`\n * property of the returned object will be `undefined`, and the result of the\n * `async` function or `Promise<DataType>` will reside in the `Data` property of the\n * returned object.\n *\n * Similarly, if the `async` function or `Promise<DataType>` throws, then the `Data`\n * property of the returned object is `undefined`, and the `Error` property is what\n * was thrown to the `catch` block.\n *\n * @template DataType - The type of the data that the `async` function or `Promise<DataType>`.\n * @param Source - The `async` function or `Promise` to evaluate.\n *\n * @returns {TTryResult<DataType>} A {@link TTryResult} containing either the result\n * ({@link TTryResult.Data}) or error {@link TTryResult.Error}.\n *\n * @example\n * // With an `async` function,\n * async function GetName(): Promise<string> { ... }\n * // Or, with a `Promise`,\n * const GetName: Promise<string> = new Promise<string>(...);\n *\n * // For both of the above cases, `Try` behaves the same:\n * const { Data: Name, Error: NameError } = await Try(GetName);\n * // If `GetName` returned,\n * // `typeof Name` <- `\"string\"`\n * // `typeof NameError` <- `\"undefined\"`\n * // If `GetName` threw,\n * // `typeof Name` <- `\"undefined\"`\n * // `NameError !== undefined` <- `true` (Unless `GetName` threw `undefined`).\n */\nexport async function Try<DataType>(Source: TTrySource<DataType>): Promise<TTryResult<DataType>> {\n try {\n const Data: DataType = typeof Source === \"function\"\n ? await Source()\n : await Source;\n return {\n Data,\n Error: undefined\n };\n }\n catch (ErrorValue: unknown) {\n return {\n Data: undefined,\n Error: ErrorValue\n };\n }\n}\n/**\n * A cleaner way of using `Array.prototype.map` with an `async` function.\n *\n * @template ArgumentElementType - The type of the given {@link Elements}.\n * @template ReturnElementType - The type of the `Array` returned by this.\n *\n * @param Elements - The `Array` that will be transformed.\n * @param Mapper - The function that maps each {@link ArgumentElementType}\n * to a {@link ReturnElementType}.\n *\n * @returns {Array<ReturnElementType>} An `Array` of {@link ReturnElementType}.\n *\n * @example\n * In an `async` function,\n * ```typescript\n * const ArgumentElements: Array<ArgumentElementType> = [ ... ];\n * const ToReturnElement = async (Element: ArgumentElementType): Promise<ReturnElementType> => ...;\n * const ReturnElements: Array<ReturnElementType> = await Map(ArgumentElements, ToReturnElement);\n * ```\n */\nexport async function Map<ArgumentElementType, ReturnElementType>(Elements: Array<ArgumentElementType>, Mapper: ((Element: ArgumentElementType) => Promise<ReturnElementType>)): Promise<Array<ReturnElementType>> {\n const MapperWrapped = async (Element: ArgumentElementType): Promise<ReturnElementType> => {\n return Mapper(Element);\n };\n const Out: Array<Promise<ReturnElementType>> = Elements.map(MapperWrapped);\n return await Promise.all(Out);\n}\n/**\n * An abstract implementation of {@link PromiseLike}. This exists only to maintain the\n * project's naming convention.\n */\nexport abstract class TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public then<ResultType = ResolveType, RejectType = never>(_OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, _OnRejected?: TOnRejected<RejectType>): TPromiseLike<ResultType | RejectType> {\n throw new AbstractMethodCallError(\"TPromiseLike\");\n }\n}\n/**\n * The {@link TypeError} that is thrown by the constructor of {@link TPromise}\n * iff it receives an argument that is not a {@link TPromiseCtorArgument}.\n * It does not provide any additional information (in particular, it does not\n * add any properties, and it does not set any properties inherited from\n * {@link TypeError}).\n *\n * @note While the argument type of {@link TPromise}'s constructor is checked at runtime,\n * the type checker should prevent the error described by this from happening.\n */\nexport class FPromiseInstantiationError extends TypeError {\n public constructor() {\n super();\n }\n}\n/**\n * A `then`-able wrapper of {@link Promise}.\n *\n * @template ResolveType - The type to which this resolves, if it does resolve.\n */\nexport class TPromise<ResolveType> extends TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public constructor(Argument: TPromiseCtorArgument<ResolveType>) {\n super();\n if (typeof Argument === \"function\") {\n this.Underlying = new Promise<ResolveType>(Argument);\n }\n else {\n if (Argument instanceof TPromise) {\n this.Underlying = Argument.Raw();\n }\n else if (Argument instanceof Promise) {\n this.Underlying = Argument;\n }\n }\n throw new FPromiseInstantiationError();\n }\n private readonly Underlying: Promise<ResolveType>;\n /**\n * This class's extension of {@link Promise!then}.\n *\n * @template ResultType - The type to which the value underlying the {@link TPromise} returned by this\n * will resolve, if the {@link TPromise} resolves.\n *\n * @template RejectType - The type to which the value underlying the {@link TPromise} returned by this\n * will reject, if the {@link TPromise} rejects.\n *\n * @param OnFulfilled - The callback that is called when the underlying {@link Promise} resolves,\n * if it resolves.\n *\n * @param OnRejected - The callback that is called when the underlying {@link Promise} rejects,\n * if it rejects.\n *\n * @returns {TPromise<ResultType | RejectType>} A new {@link TPromise} of the result of the\n * given callbacks.\n *\n * @example\n * ```typescript\n * const Example: TPromise<string> = new TPromise<string>((Resolve, Reject) =>\n * {\n * if (Math.random() < 0.5)\n * {\n * Resolve(\"Success\");\n * }\n * else\n * {\n * Reject(\"Error\");\n * }\n * });\n *\n * Example.then(\n * (Value: string): void =>\n * {\n * // `Value` <- `\"Success\"`\n * },\n * (Reason: unknown): void =>\n * {\n * // `Reason` <- `\"Error\"`\n * }\n * );\n * ```\n */\n public Then<ResultType = ResolveType, RejectType = never>(OnFulfilled: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public override then<ResultType = ResolveType, RejectType = never>(OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public Catch<ResultType = never>(OnRejected?: TNullable<TOnRejected<ResolveType>>): TPromiseLike<ResolveType | ResultType> {\n return new TPromise<ResolveType | ResultType>(this.Underlying.catch(OnRejected));\n }\n public Finally(OnFinally?: TNullable<TFunction>): TPromise<ResolveType> {\n return new TPromise(this.Underlying.finally(OnFinally));\n }\n public static Resolve<ResolveType>(Value: ResolveType | PromiseLike<ResolveType>): TPromise<Awaited<ResolveType>> {\n return new TPromise(Promise.resolve(Value));\n }\n public static Reject<ResolveType = unknown>(Reason?: unknown): TPromise<ResolveType> {\n return new TPromise(Promise.reject<ResolveType>(Reason));\n }\n public Raw(): Promise<ResolveType> {\n return this.Underlying;\n }\n}\n;\n"],
5
+ "mappings": ";AAqEO,IAAM,0BAAN,cAAsC,MAAM;AAAA,EACxC,YAAY,WAAoB;AACnC,UAAM,SAAS;AAAA,EACnB;AACJ;;;AC/BA,eAAsB,IAAc,QAA6D;AAC7F,MAAI;AACA,UAAM,OAAiB,OAAO,WAAW,aACnC,MAAM,OAAO,IACb,MAAM;AACZ,WAAO;AAAA,MACH;AAAA,MACA,OAAO;AAAA,IACX;AAAA,EACJ,SACO,YAAqB;AACxB,WAAO;AAAA,MACH,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,EACJ;AACJ;AAqBA,eAAsB,IAA4C,UAAsC,QAA2G;AAC/M,QAAM,gBAAgB,OAAO,YAA6D;AACtF,WAAO,OAAO,OAAO;AAAA,EACzB;AACA,QAAM,MAAyC,SAAS,IAAI,aAAa;AACzE,SAAO,MAAM,QAAQ,IAAI,GAAG;AAChC;AAKO,IAAe,eAAf,MAA6E;AAAA,EACz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K,CAAC;AAAA,EAC9C;AAAA,EACA,OAAc,OAA8B,QAAyC;AACjF,WAAO,IAAI,UAAS,QAAQ,OAAoB,MAAM,CAAC;AAAA,EAC3D;AAAA,EACO,MAA4B;AAC/B,WAAO,KAAK;AAAA,EAChB;AACJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../Source/index.ts", "../Source/Array/index.ts", "../Source/Array/Array.ts", "../Source/Async/index.ts", "../Source/Miscellaneous/Utility.Types.ts", "../Source/Async/Async.ts", "../Source/Math/Complex.ts", "../Source/Math/Complex.Internal.ts", "../Source/FileSystem/index.ts", "../Source/FileSystem/FileSystem.ts", "../Source/Functional/index.ts", "../Source/Functional/Functional.ts", "../Source/Math/index.ts", "../Source/Math/Index.Complex.ts", "../Source/Math/Vector.ts", "../Source/Math/Math.ts", "../Source/Miscellaneous/index.ts", "../Source/Npm/index.ts", "../Source/Npm/Npm.ts", "../Source/Npm/Npm.Error.ts", "../Source/Path/index.ts", "../Source/Path/Path.ts", "../Source/String/index.ts", "../Source/String/String.ts"],
4
- "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module\n * General-purpose utility types and functions.\n * This module barrel-exports each scoped export of this package.\n * Use the scoped exports of this package to access only specific\n * utilities (*e.g.*, `async`, `npm`, *etc.*).\n */\nexport * as Array from \"./Array/index.ts\";\nexport * as Async from \"./Async/index.ts\";\nexport * as Complex from \"./Math/Complex.ts\";\nexport * as FileSystem from \"./FileSystem/index.ts\";\nexport * as Functional from \"./Functional/index.ts\";\nexport * as Math from \"./Math/index.ts\";\nexport * as Miscellaneous from \"./Miscellaneous/index.ts\";\nexport * as Npm from \"./Npm/index.ts\";\nexport * as Path from \"./Path/index.ts\";\nexport * as String from \"./String/index.ts\";\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Array.ts\";\nexport * from \"./Array.Types.ts\";\n", "/**\n * @file Array.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type { FilteredArray, Options, TArrayType } from \"./Array.Types.ts\";\nimport type { NoOptions } from \"../Miscellaneous/Utility.Types.ts\";\n/**\n * Filter out all instances of `undefined` from a given {@link Array:param}.\n * @param Array - The array to filter.\n *\n * @template ElementType - The type of the elements in the array.\n *\n * @returns {TArrayType<Exclude<ElementType, undefined>, Exclude<OptionsType, Options.MaybeDefined>>}\n * A new `Array` of type `Exclude<ElementType, undefined>` and `OptionsType` that is the given\n * {@link OptionsType}, with the {@link Options.MaybeDefined} option removed.\n *\n * @example With the given {@link ElementType} including `undefined`.\n * ```typescript\n * const MaybeOddNumbers: TArray<number | undefined> = [ 1, 3, undefined, 5 ];\n * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);\n * ```\n * @example With the given {@link OptionsType} including `Options.MaybeDefined`.\n * ```typescript\n * const MaybeOddNumbers: TArray<number, Options.MaybeDefined> = [ 1, 3, undefined, 5 ];\n * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);\n * ```\n */\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType> {\n return Array.filter((Element: ElementType | undefined): boolean => {\n return Element !== undefined;\n }) as FilteredArray<ElementType>;\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Async.ts\";\nexport * from \"./Async.Types.ts\";\n", "/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type * as TypeScript from \"typescript\";\nimport type { NoOptions } from \"./Utility.Internal.ts\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The union of a given {@link ElementType} and the array of a given {@link ElementType}.\n *\n * @template ElementType - The type of this, or the type of elements contained by this.\n */\nexport type TMaybeArray<ElementType> = ElementType | Array<ElementType>;\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\nexport type FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n", "/**\n * @file Async.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { AbstractMethodCallError, type TNullable } from \"../Miscellaneous/Utility.Types.ts\";\nimport type { TOnFulfilled, TOnRejected, TPromiseCtorArgument, TTryResult, TTrySource } from \"./Async.Types.ts\";\nimport type { TFunction } from \"../Functional/Functional.Types.ts\";\n/**\n * Implements \"Errors-as-values\" for `async` functions and `Promise<DataType>`s.\n *\n * If the `async` function or `Promise<DataType>` returns/resolves, then the `Error`\n * property of the returned object will be `undefined`, and the result of the\n * `async` function or `Promise<DataType>` will reside in the `Data` property of the\n * returned object.\n *\n * Similarly, if the `async` function or `Promise<DataType>` throws, then the `Data`\n * property of the returned object is `undefined`, and the `Error` property is what\n * was thrown to the `catch` block.\n *\n * @template DataType - The type of the data that the `async` function or `Promise<DataType>`.\n * @param Source - The `async` function or `Promise` to evaluate.\n *\n * @returns {TTryResult<DataType>} A {@link TTryResult} containing either the result\n * ({@link TTryResult.Data}) or error {@link TTryResult.Error}.\n *\n * @example\n * // With an `async` function,\n * async function GetName(): Promise<string> { ... }\n * // Or, with a `Promise`,\n * const GetName: Promise<string> = new Promise<string>(...);\n *\n * // For both of the above cases, `Try` behaves the same:\n * const { Data: Name, Error: NameError } = await Try(GetName);\n * // If `GetName` returned,\n * // `typeof Name` <- `\"string\"`\n * // `typeof NameError` <- `\"undefined\"`\n * // If `GetName` threw,\n * // `typeof Name` <- `\"undefined\"`\n * // `NameError !== undefined` <- `true` (Unless `GetName` threw `undefined`).\n */\nexport async function Try<DataType>(Source: TTrySource<DataType>): Promise<TTryResult<DataType>> {\n try {\n const Data: DataType = typeof Source === \"function\"\n ? await Source()\n : await Source;\n return {\n Data,\n Error: undefined\n };\n }\n catch (ErrorValue: unknown) {\n return {\n Data: undefined,\n Error: ErrorValue\n };\n }\n}\n/**\n * A cleaner way of using `Array.prototype.map` with an `async` function.\n *\n * @template ArgumentElementType - The type of the given {@link Elements}.\n * @template ReturnElementType - The type of the `Array` returned by this.\n *\n * @param Elements - The `Array` that will be transformed.\n * @param Mapper - The function that maps each {@link ArgumentElementType}\n * to a {@link ReturnElementType}.\n *\n * @returns {Array<ReturnElementType>} An `Array` of {@link ReturnElementType}.\n *\n * @example\n * In an `async` function,\n * ```typescript\n * const ArgumentElements: Array<ArgumentElementType> = [ ... ];\n * const ToReturnElement = async (Element: ArgumentElementType): Promise<ReturnElementType> => ...;\n * const ReturnElements: Array<ReturnElementType> = await Map(ArgumentElements, ToReturnElement);\n * ```\n */\nexport async function Map<ArgumentElementType, ReturnElementType>(Elements: Array<ArgumentElementType>, Mapper: ((Element: ArgumentElementType) => Promise<ReturnElementType>)): Promise<Array<ReturnElementType>> {\n const MapperWrapped = async (Element: ArgumentElementType): Promise<ReturnElementType> => {\n return Mapper(Element);\n };\n const Out: Array<Promise<ReturnElementType>> = Elements.map(MapperWrapped);\n return await Promise.all(Out);\n}\n/**\n * An abstract implementation of {@link PromiseLike}. This exists only to maintain the\n * project's naming convention.\n */\nexport abstract class TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public then<ResultType = ResolveType, RejectType = never>(_OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, _OnRejected?: TOnRejected<RejectType>): TPromiseLike<ResultType | RejectType> {\n throw new AbstractMethodCallError(\"TPromiseLike\");\n }\n}\n/**\n * The {@link TypeError} that is thrown by the constructor of {@link TPromise}\n * iff it receives an argument that is not a {@link TPromiseCtorArgument}.\n * It does not provide any additional information (in particular, it does not\n * add any properties, and it does not set any properties inherited from\n * {@link TypeError}).\n *\n * @note While the argument type of {@link TPromise}'s constructor is checked at runtime,\n * the type checker should prevent the error described by this from happening.\n */\nexport class FPromiseInstantiationError extends TypeError {\n public constructor() {\n super();\n }\n}\n/**\n * A `then`-able wrapper of {@link Promise}.\n *\n * @template ResolveType - The type to which this resolves, if it does resolve.\n */\nexport class TPromise<ResolveType> extends TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public constructor(Argument: TPromiseCtorArgument<ResolveType>) {\n super();\n if (typeof Argument === \"function\") {\n this.Underlying = new Promise<ResolveType>(Argument);\n }\n else {\n if (Argument instanceof TPromise) {\n this.Underlying = Argument.Raw();\n }\n else if (Argument instanceof Promise) {\n this.Underlying = Argument;\n }\n }\n throw new FPromiseInstantiationError();\n }\n private readonly Underlying: Promise<ResolveType>;\n /**\n * This class's extension of {@link Promise!then}.\n *\n * @template ResultType - The type to which the value underlying the {@link TPromise} returned by this\n * will resolve, if the {@link TPromise} resolves.\n *\n * @template RejectType - The type to which the value underlying the {@link TPromise} returned by this\n * will reject, if the {@link TPromise} rejects.\n *\n * @param OnFulfilled - The callback that is called when the underlying {@link Promise} resolves,\n * if it resolves.\n *\n * @param OnRejected - The callback that is called when the underlying {@link Promise} rejects,\n * if it rejects.\n *\n * @returns {TPromise<ResultType | RejectType>} A new {@link TPromise} of the result of the\n * given callbacks.\n *\n * @example\n * ```typescript\n * const Example: TPromise<string> = new TPromise<string>((Resolve, Reject) =>\n * {\n * if (Math.random() < 0.5)\n * {\n * Resolve(\"Success\");\n * }\n * else\n * {\n * Reject(\"Error\");\n * }\n * });\n *\n * Example.then(\n * (Value: string): void =>\n * {\n * // `Value` <- `\"Success\"`\n * },\n * (Reason: unknown): void =>\n * {\n * // `Reason` <- `\"Error\"`\n * }\n * );\n * ```\n */\n public Then<ResultType = ResolveType, RejectType = never>(OnFulfilled: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public override then<ResultType = ResolveType, RejectType = never>(OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public Catch<ResultType = never>(OnRejected?: TNullable<TOnRejected<ResolveType>>): TPromiseLike<ResolveType | ResultType> {\n return new TPromise<ResolveType | ResultType>(this.Underlying.catch(OnRejected));\n }\n public Finally(OnFinally?: TNullable<TFunction>): TPromise<ResolveType> {\n return new TPromise(this.Underlying.finally(OnFinally));\n }\n public static Resolve<ResolveType>(Value: ResolveType | PromiseLike<ResolveType>): TPromise<Awaited<ResolveType>> {\n return new TPromise(Promise.resolve(Value));\n }\n public static Reject<ResolveType = unknown>(Reason?: unknown): TPromise<ResolveType> {\n return new TPromise(Promise.reject<ResolveType>(Reason));\n }\n public Raw(): Promise<ResolveType> {\n return this.Underlying;\n }\n}\n;\n", "/**\n * @file Complex.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { MathBuiltin } from \"./Complex.Internal\";\nimport { Operator } from \"tsover-runtime\";\n/**\n * Elements of the complex plane, $\\mathbf{C} = \\mathbf{R}[x] / [ x^2 + 1 ]$.\n */\nexport class FComplex {\n public readonly Re: number;\n public readonly Im: number;\n public static Zero: FComplex = new FComplex(0, 0);\n /**\n * The copy constructor for {@link FComplex} numbers.\n *\n * @param Z - The existing {@link FComplex} number to copy.\n *\n * @example\n * ```typescript\n * const Z: FComplex = 3 + 2 * i;\n * const W: FComplex = new FComplex(Z);\n * // `W.Re === Z.Re` <- `true`\n * // `W.Im === Z.Im` <- `true`\n * ```\n */\n public constructor(Z: FComplex);\n /**\n * Construct an {@link FComplex} number by specifying the real\n * and imaginary components.\n *\n * @param A - The real component of the {@link FComplex} number.\n * @param B - The imaginary component of the {@link FComplex} number.\n *\n * @example\n * ```typescript\n * const Theta: number = 0.5;\n * const OnUnitDisk: FComplex = new FComplex(Math.sin(Theta), Math.cos(Theta));\n * ```\n */\n public constructor(A: number, B: number);\n public constructor(A: FComplex | number, B: number = 0) {\n if (typeof A === \"number\") {\n this.Re = A;\n this.Im = B;\n }\n else {\n this.Re = A.Re;\n this.Im = A.Im;\n }\n }\n /**\n * Get the modulus of this {@link FComplex} number.\n *\n * @returns {number} The modulus of this {@link FComplex} number.\n */\n public get Mod(): number {\n return MathBuiltin.sqrt((this.Re ** 2) + (this.Im ** 2));\n }\n /**\n * Get the modulus of this {@link FComplex} number.\n *\n * @returns {number} The modulus of this {@link FComplex} number.\n */\n public get Theta(): number {\n const Out: number = MathBuiltin.atan2(this.Im, this.Re);\n if (Out < 0) {\n return Out + 2 * MathBuiltin.PI;\n }\n return Out;\n }\n [Operator.star](A: FComplex, B: FComplex): FComplex;\n [Operator.star](A: FComplex, B: number): FComplex;\n [Operator.star](A: number, B: FComplex): FComplex;\n [Operator.star](A: FComplex | number, B: number | FComplex): FComplex {\n if (typeof A === \"number\") {\n return new FComplex((B as FComplex).Re * A, (B as FComplex).Im * A);\n }\n else if (typeof B === \"number\") {\n return new FComplex((A as FComplex).Re * B, (A as FComplex).Im * B);\n }\n else {\n return new FComplex((((A as FComplex).Re + (B as FComplex).Re) -\n ((A as FComplex).Im + (B as FComplex).Im)), (((A as FComplex).Re + (B as FComplex).Im) +\n ((B as FComplex).Re + (A as FComplex).Im)));\n }\n }\n [Operator.plus](A: FComplex, B: FComplex): FComplex;\n [Operator.plus](A: FComplex, B: number): FComplex;\n [Operator.plus](A: number, B: FComplex): FComplex;\n [Operator.plus](A: FComplex | number, B: number | FComplex): FComplex {\n if (typeof A === \"number\") {\n return new FComplex(A + (B as FComplex).Re, (B as FComplex).Im);\n }\n else if (typeof B === \"number\") {\n return new FComplex((A as FComplex).Re + B, (A as FComplex).Im);\n }\n else {\n return new FComplex((A as FComplex).Re + (B as FComplex).Re, (A as FComplex).Im + (B as FComplex).Im);\n }\n }\n}\nexport /**\n * The imaginary unit.\n */ const i: FComplex = new FComplex(0, 1);\n", "/**\n * @file Complex.Internal.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport const MathBuiltin: typeof Math = Math;\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./FileSystem.ts\";\nexport * from \"./FileSystem.Types.ts\";\n", "/**\n * @file FileSystem.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { basename, dirname, extname, join } from \"path\";\nimport { type FFileExtension } from \"./FileSystem.Types.ts\";\nimport { type FileHandle } from \"fs/promises\";\nimport { promises as Fs } from \"fs\";\nimport { constants as FsConstants } from \"fs\";\nimport os from \"os\";\nasync function PathExists(Path: string): Promise<boolean> {\n try {\n await Fs.access(Path, FsConstants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * @param Extension - The file extension that you wish to test.\n * @returns Whether the file extension is valid on the current platform.\n */\nexport function IsSupportedFileExtension(Extension: FFileExtension): boolean {\n let NormalizedExtension: string = Extension.slice(1);\n if (NormalizedExtension.startsWith(\".\")) {\n NormalizedExtension = NormalizedExtension.slice(1);\n }\n if (NormalizedExtension.length === 0) {\n return false;\n }\n if (NormalizedExtension.includes(\"/\")\n || NormalizedExtension.includes(\"\\\\\")\n || NormalizedExtension.includes(\"\\0\")) {\n return false;\n }\n if (os.platform() === \"win32\") {\n /* eslint-disable-next-line no-control-regex */\n const HasIllegalCharacters: boolean = /[<>:\"/\\\\|?*\\x00-\\x1F]/u.test(NormalizedExtension);\n if (HasIllegalCharacters) {\n return false;\n }\n if (/[ .]$/u.test(NormalizedExtension)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Given a path at which we wish to create a new file, check if a file at that\n * path already exists, and if so, then append `(${ number })` before the file\n * extension, consistent with the Windows Explorer handles conflicting file\n * names when pasting files.\n */\nexport async function GetSafeNewPath(InPath: string): Promise<string> {\n const DirectoryPath: string = dirname(InPath);\n const Extension: string = extname(InPath);\n const FileName: string = basename(InPath);\n const BaseFileName: string = Extension === \"\"\n ? FileName\n : basename(InPath, Extension);\n let CandidatePath: string = InPath;\n let Index: number = 1;\n while (await PathExists(CandidatePath)) {\n const CandidateFileName: string = `${BaseFileName} (${Index})${Extension}`;\n CandidatePath = join(DirectoryPath, CandidateFileName);\n Index++;\n }\n return CandidatePath;\n}\n/**\n * @param DirectoryPath - The path to the directory in which you wish to check.\n * @param FileName - The desired file name.\n * @param PersistNewFile - *(Optional)* Whether to keep the otherwise-temporary\n * file created at the desired path.\n * @param Extension - *(Optional)* If provided, the function will only return `true`\n * if `FileName.endsWith(Extension)` *and* the `Extension` is a valid\n * file extension.\n * @returns Whether a file of the given `FileName` can be created in `DirectoryPath`.\n *\n * @remarks This *does* attempt to create a file at the desired path. The file is\n * temporary iff `!PersistNewFile`, and is never created when this function\n * returns `false`.\n */\nexport async function IsValidFileName(DirectoryPath: string, FileName: string, PersistNewFile: boolean = false, Extension: FFileExtension | undefined = undefined): Promise<boolean> {\n const ExtensionSafe: FFileExtension | null | \"\" = Extension !== undefined\n ? (Extension.startsWith(\".\") && IsSupportedFileExtension(Extension))\n ? Extension\n : null\n : \"\";\n const IsExtensionImproper: boolean = (ExtensionSafe === null ||\n ExtensionSafe === \".\" ||\n !FileName.endsWith(ExtensionSafe));\n if (IsExtensionImproper) {\n return false;\n }\n const FilePath: string = join(DirectoryPath, FileName);\n try {\n const ThisFileHandle: FileHandle = await Fs.open(FilePath, \"wx\");\n await ThisFileHandle.close();\n if (!PersistNewFile) {\n await Fs.unlink(FilePath);\n }\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * Write a text file to a given {@link Path} having contents {@link Contents}.\n *\n * @param Path - The path of the file that will be written.\n * @param Contents - The text contents of the file to write.\n *\n * @returns {Promise<void>} A {@link Promise} that resolves when the call to {@link Fs.writeFile} resolves.\n *\n * @example\n * ```typescript\n * import { WriteTextFile } from \"@sorrell/utilities/fs\";\n * import { resolve } from \"path\";\n *\n * const MyReadMe: string = \"# ReadMe\\n\\nThis package accomplishes...\\n\";\n * const MyReadMePath: string = resolve(\".\");\n *\n * await WriteTextFile(MyReadMePath, MyReadMe);\n * ```\n */\nexport async function WriteTextFile(Path: string, Contents: string): Promise<void> {\n await Fs.writeFile(Path, Contents, { encoding: \"utf-8\" });\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Functional.ts\";\nexport * from \"./Functional.Types.ts\";\n", "/**\n * @file Functional.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { CurriedArgument } from \"./Functional.Internal\";\nimport type { FCurriedArgument } from \"./Functional.Internal.Types\";\nimport type { TFunction } from \"./Functional.Types\";\nexport function Identity<Type>(...Arguments: Array<Type>) {\n return Arguments;\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module Math\n * Functions, types, and classes for mathematical computations.\n */\nexport * as Complex from \"./Index.Complex.ts\";\nexport * as Vector from \"./Vector.ts\";\nexport * from \"./Math.ts\";\nexport * from \"./Math.Types.ts\";\n", "/**\n * @file Index.Complex.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Complex.ts\";\nexport * from \"./Complex.Types.ts\";\n", "/**\n * @file Vector.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { Operator } from \"tsover-runtime\";\n/** A representation of elements in $\\mathbf{R}^2$. */\nexport class FVector2D {\n /** The $x$-component of this vector. */\n public readonly X: number;\n /** The $y$-component of this vector. */\n public readonly Y: number;\n /** The identity of $\\mathbf{R}^2$ *wrt* addition. */\n public static Zero: FVector2D = new FVector2D(0, 0);\n /**\n * Construct a vector by specifying both components.\n *\n * @param Value - The value of both the {@link FVector2D!X | x}- and\n * {@link FVector2D!Y ? y}-components.\n */\n public constructor(Value: number);\n /**\n * Construct a vector by specifying both components.\n *\n * @param X - The value of the {@link FVector2D!X} component.\n * @param Y - The value of the {@link FVector2D!Y} component.\n */\n public constructor(X: number, Y: number);\n public constructor(X: number = 0, Y: number = X) {\n this.X = X;\n this.Y = Y;\n }\n /**\n * Get a representation of this vector as a `string`.\n *\n * @returns {string} The string representation of this vector.\n */\n public toString(): string {\n return `(${this.X}, ${this.Y})`;\n }\n /**\n * Perform per-component addition of two {@link FVector2D}s.\n *\n * @param Left - The left-hand operand.\n * @param Right - The right-hand operand.\n *\n * @returns {FVector2D} The per-component sum of {@link Left} and {@link Right}.\n *\n * @example\n * ```typescript\n * \"use tsover\";\n *\n * const A: FVector2D = new FVector2D(1, -1);\n * const B: FVector2D = new FVector2D(-3, 5);\n *\n * const C: FVector2D = A + B;\n * // `C` <- `(-2, 4)`\n * ```\n */\n [Operator.plus](Left: FVector2D, Right: FVector2D): FVector2D {\n return new FVector2D(Left.X + Right.X, Left.Y + Right.Y);\n }\n [Operator.minus](A: FVector2D, B: FVector2D): FVector2D {\n return new FVector2D(A.X - B.X, A.Y - B.Y);\n }\n [Operator.preMinus](Vector: FVector2D): FVector2D {\n return new FVector2D(-1 * Vector.X, -1 * Vector.Y);\n }\n /**\n * Perform scalar multiplication of an {@link FVector2D} and a `number` value.\n * Exactly one of the two arguments must be a `number`, and the other an\n * {@link FVector2D}.\n *\n * @param Left - The left-hand operand (either a `number` or an {@link FVector2D}).\n * @param Left - The right-hand operand (either a `number` or an {@link FVector2D}).\n *\n * @returns {FVector2D} The per-component sum of {@link Left} and {@link Right}.\n */\n [Operator.star](Left: number, Right: FVector2D): FVector2D;\n [Operator.star](Left: FVector2D, Right: number): FVector2D;\n [Operator.star](Left: FVector2D | number, Right: FVector2D | number): FVector2D | typeof Operator.deferOperation {\n if (typeof Left === \"number\" && Right instanceof FVector2D) {\n return new FVector2D(Left * Right.X, Left * Right.Y);\n }\n if (typeof Right === \"number\" && Left instanceof FVector2D) {\n return new FVector2D(Left.X * Right, Left.Y * Right);\n }\n return Operator.deferOperation;\n }\n public get length(): number {\n return Math.sqrt((this.X ** 2) + (this.Y ** 2));\n }\n public get Length(): number {\n return this.length;\n }\n}\n/** A representation of elements in $\\mathbf{R}^3$. */\nexport class FVector {\n public readonly X: number;\n public readonly Y: number;\n public readonly Z: number;\n /** Constructs the zero {@link FVector}. */\n public constructor();\n /**\n * Constructs an {@link FVector} with all components set to {@link Value}.\n *\n * @param Value - The value of all components of the new {@link FVector}.\n */\n public constructor(Value: number);\n /**\n * Constructs an {@link FVector} with all components set to {@link Value}.\n *\n * @param X - The value of the {@link FVector!X} component.\n * @param Y - The value of the {@link FVector!Y} component.\n * @param Z - The value of the {@link FVector!Z} component.\n */\n public constructor(X: number, Y: number, Z: number);\n public constructor(X: number = 0, Y: number = X, Z: number = X) {\n this.X = X;\n this.Y = Y;\n this.Z = Z;\n }\n [Operator.plus](Left: FVector, Right: FVector): FVector {\n return new FVector(Left.X + Right.X, Left.Y + Right.Y, Left.Z + Right.Z);\n }\n [Operator.minus](A: FVector, B: FVector): FVector {\n return new FVector(A.X - B.X, A.Y - B.Y, A.Z - B.Z);\n }\n [Operator.preMinus](Vector: FVector): FVector {\n return new FVector(-1 * Vector.X, -1 * Vector.Y, -1 * Vector.Z);\n }\n [Operator.star](Left: number, Right: FVector): FVector;\n [Operator.star](Left: FVector, Right: number): FVector;\n [Operator.star](Left: FVector | number, Right: FVector | number): FVector | typeof Operator.deferOperation {\n if (typeof Left === \"number\" && Right instanceof FVector) {\n return new FVector(Left * Right.X, Left * Right.Y, Left * Right.Z);\n }\n if (typeof Right === \"number\" && Left instanceof FVector) {\n return new FVector(Left.X * Right, Left.Y * Right, Left.Z * Right);\n }\n return Operator.deferOperation;\n }\n public get length(): number {\n return Math.sqrt((this.X ** 2) + (this.Y ** 2) + (this.Z ** 2));\n }\n public get Length(): number {\n return this.length;\n }\n}\n", "/**\n * @file Math.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/* eslint-disable */\nexport const __DummyExport_Number: \"DummyExport\" = \"DummyExport\" as const;\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Utility.Types.ts\";\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module Npm\n * Utilities for working with `npm` (NodeJS) packages.\n * Many of these likely work with packages of other NodeJS\n * package managers and adjacent runtimes (*e.g.*, `bun` or `deno`).\n */\nexport * from \"./Npm.ts\";\nexport * from \"./Npm.Error.ts\";\n", "/**\n * @file Npm.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { promises as Fs, constants as FsConstants } from \"fs\";\nimport { PackageJsonParseError, RootDirectoryNotFoundError } from \"./Npm.Error.ts\";\nimport { dirname, join } from \"path\";\nimport type { IPackageJson } from \"package-json-type\";\nimport Process from \"process\";\n/**\n * Get the `package.json` of the Node.js project in which the\n * given path, or the current working directory, resides.\n *\n * @param Path - The given path from which to look for a root directory.\n *\n * @throws {RootDirectoryNotFoundError | PackageJsonParseError} An error\n * describing either failure to identify a root directory, or failing to\n * parse the discovered `package.json`.\n *\n * @returns {Promise<IPackageJson>} The {@link IPackageJson} of {@link Path}\n * if provided, otherwise of `process.cwd()`.\n *\n * @example\n * Suppose `process.cwd() === \"./MyPackage\"`,\n * ```typescript\n * const PackageJson: IPackageJson = await GetPackageJson();\n * // `PackageJson` <- *The parsed `package.json` of `MyPackage`.*\n * ```\n */\nexport async function GetPackageJson(Path?: string): Promise<IPackageJson> {\n const RootDirectory: string = await GetPackageRootDirectory(Path);\n const PackageJsonPath: string = join(RootDirectory, \"package.json\");\n const FileContents: string = await Fs.readFile(PackageJsonPath, \"utf-8\");\n const PackageJson: IPackageJson = await (async (): Promise<IPackageJson> => {\n try {\n return JSON.parse(FileContents) as IPackageJson;\n }\n catch (Cause: unknown) {\n throw new PackageJsonParseError({ Cause, Path: PackageJsonPath });\n }\n })();\n return PackageJson;\n}\n/**\n * Get the root directory of the Node.js project in which the\n * current working directory resides.\n *\n * @param Path - The given path from which to look for a root directory.\n *\n * @throws {RootDirectoryNotFoundError} An error iff the root directory\n * of a NodeJS package could not be found.\n *\n * @returns {Promise<string>} The path to the root directory of the package\n * containing {@link Path} if specified, otherwise containing `process.cwd()`.\n *\n * @example\n * Suppose `process.cwd()` is any one of the following,\n * - `/home/alex/myPackage`,\n * - `/home/alex/myPackage/src/MyModule`,\n * - `/home/alex/myPackage/resource/Images`,\n *\n * then,\n *\n * ```typescript\n * const Root: string = await GetPackageRootDirectory();\n * // `Root` <- `\"/home/alex/myPackage\"`\n * ```\n *\n * @example\n * Suppose `TestPath === \"/home/alex/Documents\"` is *not* a NodeJS package root\n * (of course, neither are `/home/alex` or `/home`). Then,\n *\n * ```typescript\n * const TestPath: string = \"/home/alex/Documents\";\n * let Root: string | undefined = undefined;\n * try\n * {\n * Root = await GetPackageRootDirectory(TestPath);\n * }\n * catch (Error: unknown)\n * {\n * // `Error instanceof RootDirectoryNotFound`\n * }\n *\n * // `Root` <- `undefined`\n * ```\n *\n * @example\n * Suppose `process.cwd() === /home/alex/Downloads`, which is *not* a NodeJS package\n * (of course, neither are `/home/alex` or `/home`). Then,\n *\n * ```typescript\n * let Root: string | undefined = undefined;\n * try\n * {\n * Root = await GetPackageRootDirectory();\n * }\n * catch (Error: unknown)\n * {\n * // `Error instanceof RootDirectoryNotFound`\n * }\n * // `Root` <- `undefined`\n * ```\n */\nexport async function GetPackageRootDirectory(Path?: string): Promise<string> {\n let CurrentDirectory: string = await Fs.realpath(Path ?? Process.cwd());\n while (true) {\n const PackageJsonPath: string = join(CurrentDirectory, \"package.json\");\n const PackageJsonExists: boolean = await (async (): Promise<boolean> => {\n try {\n await Fs.access(PackageJsonPath, FsConstants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n })();\n if (PackageJsonExists) {\n return CurrentDirectory;\n }\n const ParentDirectory: string = dirname(CurrentDirectory);\n if (ParentDirectory === CurrentDirectory) {\n throw new RootDirectoryNotFoundError({ Path });\n }\n CurrentDirectory = ParentDirectory;\n }\n}\n", "/**\n * @file Npm.Error.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { Data } from \"effect\";\n/**\n * An error describing that {@link GetPackageJson} failed to parse the discovered `package.json` file.\n *\n * @property {string | undefined} Path - The `Path` argument passed to the effect returning this error,\n * if one was given.\n * @property {unknown} Cause - The cause of this error.\n */\nexport class PackageJsonParseError extends Data.TaggedError(\"PackageJsonParseError\")<{\n readonly Path: string | undefined;\n readonly Cause: unknown;\n}> {\n}\n/**\n * An error describing that {@link GetPackageRootDirectory} failed.\n *\n * @property {string | undefined} Path - The `Path` argument passed to the effect returning\n * this error, if one was given.\n */\nexport class RootDirectoryNotFoundError extends Data.TaggedError(\"RootDirectoryNotFound\")<{\n readonly Path: string | undefined;\n}> {\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Path.ts\";\n", "/**\n * @file Path.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { join } from \"path\";\nimport { Operator } from \"tsover-runtime\";\nexport class FPath {\n public readonly Raw: string;\n public toString(): string {\n return this.Raw;\n }\n public constructor(String: string);\n public constructor(Other: FPath);\n public constructor(Argument: string | FPath) {\n if (typeof Argument === \"string\") {\n this.Raw = Argument;\n }\n else {\n this.Raw = Argument.Raw;\n }\n }\n [Operator.slash](A: FPath, B: FPath): FPath;\n [Operator.slash](A: string, B: FPath): FPath;\n [Operator.slash](A: FPath, B: string): FPath;\n [Operator.slash](A: FPath | string, B: FPath | string): FPath {\n if (typeof A === \"string\") {\n return new FPath(join(A, (B as FPath).Raw));\n }\n else if (typeof B === \"string\") {\n return new FPath(join((A as FPath).Raw, B));\n }\n else {\n return new FPath(join((A as FPath).Raw, (B as FPath).Raw));\n }\n }\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./String.ts\";\n", "/**\n * @file String.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module String\n * Functions for manipulating strings.\n */\n/**\n * @param In - The string that you wish to test.\n * @returns Whether the given string contains *only* (Latin alphabet) letters.\n */\nexport function IsLetters(In: string): boolean {\n return /^[a-zA-Z]*$/.test(In);\n}\n/**\n * @remarks *(This is an alias for `IsOnlyLetters`).*\n *\n * @param In - The string that you wish to test.\n * @returns Whether the given string contains *only* (Latin alphabet) letters.\n */\nexport function IsAlpha(In: string): boolean {\n return IsLetters(In);\n}\n/**\n * @param In - The string that you wish to test.\n * @returns Whether the given string contains *only* numeric digits.\n */\nexport function IsNumeric(In: string): boolean {\n return /^\\d+$/.test(In);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;;;ACgCO,SAAS,cAAuG,OAAuH;AAC1O,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;ACrCA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,SAAS,UAAU,IAAqB;AAC3C,SAAO,cAAc,KAAK,EAAE;AAChC;AAOO,SAAS,QAAQ,IAAqB;AACzC,SAAO,UAAU,EAAE;AACvB;AAKO,SAAS,UAAU,IAAqB;AAC3C,SAAO,QAAQ,KAAK,EAAE;AAC1B;",
4
+ "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module\n * General-purpose utility types and functions.\n * This module barrel-exports each scoped export of this package.\n * Use the scoped exports of this package to access only specific\n * utilities (*e.g.*, `async`, `npm`, *etc.*).\n */\nexport * as Array from \"./Array/index.ts\";\nexport * as Async from \"./Async/index.ts\";\nexport * as Complex from \"./Math/Complex.ts\";\nexport * as FileSystem from \"./FileSystem/index.ts\";\nexport * as Functional from \"./Functional/index.ts\";\nexport * as Math from \"./Math/index.ts\";\nexport * as Miscellaneous from \"./Miscellaneous/index.ts\";\nexport * as Npm from \"./Npm/index.ts\";\nexport * as Path from \"./Path/index.ts\";\nexport * as String from \"./String/index.ts\";\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Array.ts\";\nexport * from \"./Array.Types.ts\";\n", "/**\n * @file Array.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type { FilteredArray, Options, TArrayType } from \"./Array.Types.ts\";\nimport type { NoOptions } from \"../Miscellaneous/Utility.Types.ts\";\n/**\n * Filter out all instances of `undefined` from a given {@link Array:param}.\n * @param Array - The array to filter.\n *\n * @template ElementType - The type of the elements in the array.\n *\n * @returns {TArrayType<Exclude<ElementType, undefined>, Exclude<OptionsType, Options.MaybeDefined>>}\n * A new `Array` of type `Exclude<ElementType, undefined>` and `OptionsType` that is the given\n * {@link OptionsType}, with the {@link Options.MaybeDefined} option removed.\n *\n * @example With the given {@link ElementType} including `undefined`.\n * ```typescript\n * const MaybeOddNumbers: TArray<number | undefined> = [ 1, 3, undefined, 5 ];\n * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);\n * ```\n * @example With the given {@link OptionsType} including `Options.MaybeDefined`.\n * ```typescript\n * const MaybeOddNumbers: TArray<number, Options.MaybeDefined> = [ 1, 3, undefined, 5 ];\n * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);\n * ```\n */\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType> {\n return Array.filter((Element: ElementType | undefined): boolean => {\n return Element !== undefined;\n }) as FilteredArray<ElementType>;\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Async.ts\";\nexport * from \"./Async.Types.ts\";\n", "/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type { NoOptions } from \"./Utility.Internal.ts\";\nimport type TypeScript from \"typescript\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\n/** An error that is thrown in default implementations of `abstract` `class`es. */\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\ntype FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n/**\n * Maps a given {@link RecordLike} type to an identical {@link Record} type, but\n * the properties are wrapped with {@link NonNullable}.\n *\n * @template RecordLike - The `Record`-like type from which this type is defined.\n */\nexport type TRecordNonNullable<RecordLike> = {\n [Key in keyof RecordLike]: NonNullable<RecordLike[Key]>;\n};\n", "/**\n * @file Async.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { AbstractMethodCallError, type TNullable } from \"../Miscellaneous/Utility.Types.ts\";\nimport type { TOnFulfilled, TOnRejected, TPromiseCtorArgument, TTryResult, TTrySource } from \"./Async.Types.ts\";\nimport type { TFunction } from \"../Functional/Functional.Types.ts\";\n/**\n * Implements \"Errors-as-values\" for `async` functions and `Promise<DataType>`s.\n *\n * If the `async` function or `Promise<DataType>` returns/resolves, then the `Error`\n * property of the returned object will be `undefined`, and the result of the\n * `async` function or `Promise<DataType>` will reside in the `Data` property of the\n * returned object.\n *\n * Similarly, if the `async` function or `Promise<DataType>` throws, then the `Data`\n * property of the returned object is `undefined`, and the `Error` property is what\n * was thrown to the `catch` block.\n *\n * @template DataType - The type of the data that the `async` function or `Promise<DataType>`.\n * @param Source - The `async` function or `Promise` to evaluate.\n *\n * @returns {TTryResult<DataType>} A {@link TTryResult} containing either the result\n * ({@link TTryResult.Data}) or error {@link TTryResult.Error}.\n *\n * @example\n * // With an `async` function,\n * async function GetName(): Promise<string> { ... }\n * // Or, with a `Promise`,\n * const GetName: Promise<string> = new Promise<string>(...);\n *\n * // For both of the above cases, `Try` behaves the same:\n * const { Data: Name, Error: NameError } = await Try(GetName);\n * // If `GetName` returned,\n * // `typeof Name` <- `\"string\"`\n * // `typeof NameError` <- `\"undefined\"`\n * // If `GetName` threw,\n * // `typeof Name` <- `\"undefined\"`\n * // `NameError !== undefined` <- `true` (Unless `GetName` threw `undefined`).\n */\nexport async function Try<DataType>(Source: TTrySource<DataType>): Promise<TTryResult<DataType>> {\n try {\n const Data: DataType = typeof Source === \"function\"\n ? await Source()\n : await Source;\n return {\n Data,\n Error: undefined\n };\n }\n catch (ErrorValue: unknown) {\n return {\n Data: undefined,\n Error: ErrorValue\n };\n }\n}\n/**\n * A cleaner way of using `Array.prototype.map` with an `async` function.\n *\n * @template ArgumentElementType - The type of the given {@link Elements}.\n * @template ReturnElementType - The type of the `Array` returned by this.\n *\n * @param Elements - The `Array` that will be transformed.\n * @param Mapper - The function that maps each {@link ArgumentElementType}\n * to a {@link ReturnElementType}.\n *\n * @returns {Array<ReturnElementType>} An `Array` of {@link ReturnElementType}.\n *\n * @example\n * In an `async` function,\n * ```typescript\n * const ArgumentElements: Array<ArgumentElementType> = [ ... ];\n * const ToReturnElement = async (Element: ArgumentElementType): Promise<ReturnElementType> => ...;\n * const ReturnElements: Array<ReturnElementType> = await Map(ArgumentElements, ToReturnElement);\n * ```\n */\nexport async function Map<ArgumentElementType, ReturnElementType>(Elements: Array<ArgumentElementType>, Mapper: ((Element: ArgumentElementType) => Promise<ReturnElementType>)): Promise<Array<ReturnElementType>> {\n const MapperWrapped = async (Element: ArgumentElementType): Promise<ReturnElementType> => {\n return Mapper(Element);\n };\n const Out: Array<Promise<ReturnElementType>> = Elements.map(MapperWrapped);\n return await Promise.all(Out);\n}\n/**\n * An abstract implementation of {@link PromiseLike}. This exists only to maintain the\n * project's naming convention.\n */\nexport abstract class TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public then<ResultType = ResolveType, RejectType = never>(_OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, _OnRejected?: TOnRejected<RejectType>): TPromiseLike<ResultType | RejectType> {\n throw new AbstractMethodCallError(\"TPromiseLike\");\n }\n}\n/**\n * The {@link TypeError} that is thrown by the constructor of {@link TPromise}\n * iff it receives an argument that is not a {@link TPromiseCtorArgument}.\n * It does not provide any additional information (in particular, it does not\n * add any properties, and it does not set any properties inherited from\n * {@link TypeError}).\n *\n * @note While the argument type of {@link TPromise}'s constructor is checked at runtime,\n * the type checker should prevent the error described by this from happening.\n */\nexport class FPromiseInstantiationError extends TypeError {\n public constructor() {\n super();\n }\n}\n/**\n * A `then`-able wrapper of {@link Promise}.\n *\n * @template ResolveType - The type to which this resolves, if it does resolve.\n */\nexport class TPromise<ResolveType> extends TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public constructor(Argument: TPromiseCtorArgument<ResolveType>) {\n super();\n if (typeof Argument === \"function\") {\n this.Underlying = new Promise<ResolveType>(Argument);\n }\n else {\n if (Argument instanceof TPromise) {\n this.Underlying = Argument.Raw();\n }\n else if (Argument instanceof Promise) {\n this.Underlying = Argument;\n }\n }\n throw new FPromiseInstantiationError();\n }\n private readonly Underlying: Promise<ResolveType>;\n /**\n * This class's extension of {@link Promise!then}.\n *\n * @template ResultType - The type to which the value underlying the {@link TPromise} returned by this\n * will resolve, if the {@link TPromise} resolves.\n *\n * @template RejectType - The type to which the value underlying the {@link TPromise} returned by this\n * will reject, if the {@link TPromise} rejects.\n *\n * @param OnFulfilled - The callback that is called when the underlying {@link Promise} resolves,\n * if it resolves.\n *\n * @param OnRejected - The callback that is called when the underlying {@link Promise} rejects,\n * if it rejects.\n *\n * @returns {TPromise<ResultType | RejectType>} A new {@link TPromise} of the result of the\n * given callbacks.\n *\n * @example\n * ```typescript\n * const Example: TPromise<string> = new TPromise<string>((Resolve, Reject) =>\n * {\n * if (Math.random() < 0.5)\n * {\n * Resolve(\"Success\");\n * }\n * else\n * {\n * Reject(\"Error\");\n * }\n * });\n *\n * Example.then(\n * (Value: string): void =>\n * {\n * // `Value` <- `\"Success\"`\n * },\n * (Reason: unknown): void =>\n * {\n * // `Reason` <- `\"Error\"`\n * }\n * );\n * ```\n */\n public Then<ResultType = ResolveType, RejectType = never>(OnFulfilled: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public override then<ResultType = ResolveType, RejectType = never>(OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public Catch<ResultType = never>(OnRejected?: TNullable<TOnRejected<ResolveType>>): TPromiseLike<ResolveType | ResultType> {\n return new TPromise<ResolveType | ResultType>(this.Underlying.catch(OnRejected));\n }\n public Finally(OnFinally?: TNullable<TFunction>): TPromise<ResolveType> {\n return new TPromise(this.Underlying.finally(OnFinally));\n }\n public static Resolve<ResolveType>(Value: ResolveType | PromiseLike<ResolveType>): TPromise<Awaited<ResolveType>> {\n return new TPromise(Promise.resolve(Value));\n }\n public static Reject<ResolveType = unknown>(Reason?: unknown): TPromise<ResolveType> {\n return new TPromise(Promise.reject<ResolveType>(Reason));\n }\n public Raw(): Promise<ResolveType> {\n return this.Underlying;\n }\n}\n;\n", "/**\n * @file Complex.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { MathBuiltin } from \"./Complex.Internal\";\nimport { Operator } from \"tsover-runtime\";\n/**\n * Elements of the complex plane, $\\mathbf{C} = \\mathbf{R}[x] / [ x^2 + 1 ]$.\n */\nexport class FComplex {\n public readonly Re: number;\n public readonly Im: number;\n public static Zero: FComplex = new FComplex(0, 0);\n /**\n * The copy constructor for {@link FComplex} numbers.\n *\n * @param Z - The existing {@link FComplex} number to copy.\n *\n * @example\n * ```typescript\n * const Z: FComplex = 3 + 2 * i;\n * const W: FComplex = new FComplex(Z);\n * // `W.Re === Z.Re` <- `true`\n * // `W.Im === Z.Im` <- `true`\n * ```\n */\n public constructor(Z: FComplex);\n /**\n * Construct an {@link FComplex} number by specifying the real\n * and imaginary components.\n *\n * @param A - The real component of the {@link FComplex} number.\n * @param B - The imaginary component of the {@link FComplex} number.\n *\n * @example\n * ```typescript\n * const Theta: number = 0.5;\n * const OnUnitDisk: FComplex = new FComplex(Math.sin(Theta), Math.cos(Theta));\n * ```\n */\n public constructor(A: number, B: number);\n public constructor(A: FComplex | number, B: number = 0) {\n if (typeof A === \"number\") {\n this.Re = A;\n this.Im = B;\n }\n else {\n this.Re = A.Re;\n this.Im = A.Im;\n }\n }\n /**\n * Get the modulus of this {@link FComplex} number.\n *\n * @returns {number} The modulus of this {@link FComplex} number.\n */\n public get Mod(): number {\n return MathBuiltin.sqrt((this.Re ** 2) + (this.Im ** 2));\n }\n /**\n * Get the modulus of this {@link FComplex} number.\n *\n * @returns {number} The modulus of this {@link FComplex} number.\n */\n public get Theta(): number {\n const Out: number = MathBuiltin.atan2(this.Im, this.Re);\n if (Out < 0) {\n return Out + 2 * MathBuiltin.PI;\n }\n return Out;\n }\n [Operator.star](A: FComplex, B: FComplex): FComplex;\n [Operator.star](A: FComplex, B: number): FComplex;\n [Operator.star](A: number, B: FComplex): FComplex;\n [Operator.star](A: FComplex | number, B: number | FComplex): FComplex {\n if (typeof A === \"number\") {\n return new FComplex((B as FComplex).Re * A, (B as FComplex).Im * A);\n }\n else if (typeof B === \"number\") {\n return new FComplex((A as FComplex).Re * B, (A as FComplex).Im * B);\n }\n else {\n return new FComplex((((A as FComplex).Re + (B as FComplex).Re) -\n ((A as FComplex).Im + (B as FComplex).Im)), (((A as FComplex).Re + (B as FComplex).Im) +\n ((B as FComplex).Re + (A as FComplex).Im)));\n }\n }\n [Operator.plus](A: FComplex, B: FComplex): FComplex;\n [Operator.plus](A: FComplex, B: number): FComplex;\n [Operator.plus](A: number, B: FComplex): FComplex;\n [Operator.plus](A: FComplex | number, B: number | FComplex): FComplex {\n if (typeof A === \"number\") {\n return new FComplex(A + (B as FComplex).Re, (B as FComplex).Im);\n }\n else if (typeof B === \"number\") {\n return new FComplex((A as FComplex).Re + B, (A as FComplex).Im);\n }\n else {\n return new FComplex((A as FComplex).Re + (B as FComplex).Re, (A as FComplex).Im + (B as FComplex).Im);\n }\n }\n}\nexport /**\n * The imaginary unit.\n */ const i: FComplex = new FComplex(0, 1);\n", "/**\n * @file Complex.Internal.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport const MathBuiltin: typeof Math = Math;\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./FileSystem.ts\";\nexport * from \"./FileSystem.Types.ts\";\n", "/**\n * @file FileSystem.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { basename, dirname, extname, join } from \"path\";\nimport { type FFileExtension } from \"./FileSystem.Types.ts\";\nimport { type FileHandle } from \"fs/promises\";\nimport { promises as Fs } from \"fs\";\nimport { constants as FsConstants } from \"fs\";\nimport os from \"os\";\nasync function PathExists(Path: string): Promise<boolean> {\n try {\n await Fs.access(Path, FsConstants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * @param Extension - The file extension that you wish to test.\n * @returns Whether the file extension is valid on the current platform.\n */\nexport function IsSupportedFileExtension(Extension: FFileExtension): boolean {\n let NormalizedExtension: string = Extension.slice(1);\n if (NormalizedExtension.startsWith(\".\")) {\n NormalizedExtension = NormalizedExtension.slice(1);\n }\n if (NormalizedExtension.length === 0) {\n return false;\n }\n if (NormalizedExtension.includes(\"/\")\n || NormalizedExtension.includes(\"\\\\\")\n || NormalizedExtension.includes(\"\\0\")) {\n return false;\n }\n if (os.platform() === \"win32\") {\n /* eslint-disable-next-line no-control-regex */\n const HasIllegalCharacters: boolean = /[<>:\"/\\\\|?*\\x00-\\x1F]/u.test(NormalizedExtension);\n if (HasIllegalCharacters) {\n return false;\n }\n if (/[ .]$/u.test(NormalizedExtension)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Given a path at which we wish to create a new file, check if a file at that\n * path already exists, and if so, then append `(${ number })` before the file\n * extension, consistent with the Windows Explorer handles conflicting file\n * names when pasting files.\n */\nexport async function GetSafeNewPath(InPath: string): Promise<string> {\n const DirectoryPath: string = dirname(InPath);\n const Extension: string = extname(InPath);\n const FileName: string = basename(InPath);\n const BaseFileName: string = Extension === \"\"\n ? FileName\n : basename(InPath, Extension);\n let CandidatePath: string = InPath;\n let Index: number = 1;\n while (await PathExists(CandidatePath)) {\n const CandidateFileName: string = `${BaseFileName} (${Index})${Extension}`;\n CandidatePath = join(DirectoryPath, CandidateFileName);\n Index++;\n }\n return CandidatePath;\n}\n/**\n * @param DirectoryPath - The path to the directory in which you wish to check.\n * @param FileName - The desired file name.\n * @param PersistNewFile - *(Optional)* Whether to keep the otherwise-temporary\n * file created at the desired path.\n * @param Extension - *(Optional)* If provided, the function will only return `true`\n * if `FileName.endsWith(Extension)` *and* the `Extension` is a valid\n * file extension.\n * @returns Whether a file of the given `FileName` can be created in `DirectoryPath`.\n *\n * @remarks This *does* attempt to create a file at the desired path. The file is\n * temporary iff `!PersistNewFile`, and is never created when this function\n * returns `false`.\n */\nexport async function IsValidFileName(DirectoryPath: string, FileName: string, PersistNewFile: boolean = false, Extension: FFileExtension | undefined = undefined): Promise<boolean> {\n const ExtensionSafe: FFileExtension | null | \"\" = Extension !== undefined\n ? (Extension.startsWith(\".\") && IsSupportedFileExtension(Extension))\n ? Extension\n : null\n : \"\";\n const IsExtensionImproper: boolean = (ExtensionSafe === null ||\n ExtensionSafe === \".\" ||\n !FileName.endsWith(ExtensionSafe));\n if (IsExtensionImproper) {\n return false;\n }\n const FilePath: string = join(DirectoryPath, FileName);\n try {\n const ThisFileHandle: FileHandle = await Fs.open(FilePath, \"wx\");\n await ThisFileHandle.close();\n if (!PersistNewFile) {\n await Fs.unlink(FilePath);\n }\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * Write a text file to a given {@link Path} having contents {@link Contents}.\n *\n * @param Path - The path of the file that will be written.\n * @param Contents - The text contents of the file to write.\n *\n * @returns {Promise<void>} A {@link Promise} that resolves when the call to {@link Fs.writeFile} resolves.\n *\n * @example\n * ```typescript\n * import { WriteTextFile } from \"@sorrell/utilities/fs\";\n * import { resolve } from \"path\";\n *\n * const MyReadMe: string = \"# ReadMe\\n\\nThis package accomplishes...\\n\";\n * const MyReadMePath: string = resolve(\".\");\n *\n * await WriteTextFile(MyReadMePath, MyReadMe);\n * ```\n */\nexport async function WriteTextFile(Path: string, Contents: string): Promise<void> {\n await Fs.writeFile(Path, Contents, { encoding: \"utf-8\" });\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Functional.ts\";\nexport * from \"./Functional.Types.ts\";\n", "/**\n * @file Functional.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { CurriedArgument } from \"./Functional.Internal\";\nimport type { FCurriedArgument } from \"./Functional.Internal.Types\";\nimport type { TFunction } from \"./Functional.Types\";\nexport function Identity<Type>(...Arguments: Array<Type>) {\n return Arguments;\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module Math\n * Functions, types, and classes for mathematical computations.\n */\nexport * as Complex from \"./Index.Complex.ts\";\nexport * as Vector from \"./Vector.ts\";\nexport * from \"./Math.ts\";\nexport * from \"./Math.Types.ts\";\n", "/**\n * @file Index.Complex.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Complex.ts\";\nexport * from \"./Complex.Types.ts\";\n", "/**\n * @file Vector.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { Operator } from \"tsover-runtime\";\n/** A representation of elements in $\\mathbf{R}^2$. */\nexport class FVector2D {\n /** The $x$-component of this vector. */\n public readonly X: number;\n /** The $y$-component of this vector. */\n public readonly Y: number;\n /** The identity of $\\mathbf{R}^2$ *wrt* addition. */\n public static Zero: FVector2D = new FVector2D(0, 0);\n /**\n * Construct a vector by specifying both components.\n *\n * @param Value - The value of both the {@link FVector2D!X | x}- and\n * {@link FVector2D!Y ? y}-components.\n */\n public constructor(Value: number);\n /**\n * Construct a vector by specifying both components.\n *\n * @param X - The value of the {@link FVector2D!X} component.\n * @param Y - The value of the {@link FVector2D!Y} component.\n */\n public constructor(X: number, Y: number);\n public constructor(X: number = 0, Y: number = X) {\n this.X = X;\n this.Y = Y;\n }\n /**\n * Get a representation of this vector as a `string`.\n *\n * @returns {string} The string representation of this vector.\n */\n public toString(): string {\n return `(${this.X}, ${this.Y})`;\n }\n /**\n * Perform per-component addition of two {@link FVector2D}s.\n *\n * @param Left - The left-hand operand.\n * @param Right - The right-hand operand.\n *\n * @returns {FVector2D} The per-component sum of {@link Left} and {@link Right}.\n *\n * @example\n * ```typescript\n * \"use tsover\";\n *\n * const A: FVector2D = new FVector2D(1, -1);\n * const B: FVector2D = new FVector2D(-3, 5);\n *\n * const C: FVector2D = A + B;\n * // `C` <- `(-2, 4)`\n * ```\n */\n [Operator.plus](Left: FVector2D, Right: FVector2D): FVector2D {\n return new FVector2D(Left.X + Right.X, Left.Y + Right.Y);\n }\n [Operator.minus](A: FVector2D, B: FVector2D): FVector2D {\n return new FVector2D(A.X - B.X, A.Y - B.Y);\n }\n [Operator.preMinus](Vector: FVector2D): FVector2D {\n return new FVector2D(-1 * Vector.X, -1 * Vector.Y);\n }\n /**\n * Perform scalar multiplication of an {@link FVector2D} and a `number` value.\n * Exactly one of the two arguments must be a `number`, and the other an\n * {@link FVector2D}.\n *\n * @param Left - The left-hand operand (either a `number` or an {@link FVector2D}).\n * @param Left - The right-hand operand (either a `number` or an {@link FVector2D}).\n *\n * @returns {FVector2D} The per-component sum of {@link Left} and {@link Right}.\n */\n [Operator.star](Left: number, Right: FVector2D): FVector2D;\n [Operator.star](Left: FVector2D, Right: number): FVector2D;\n [Operator.star](Left: FVector2D | number, Right: FVector2D | number): FVector2D | typeof Operator.deferOperation {\n if (typeof Left === \"number\" && Right instanceof FVector2D) {\n return new FVector2D(Left * Right.X, Left * Right.Y);\n }\n if (typeof Right === \"number\" && Left instanceof FVector2D) {\n return new FVector2D(Left.X * Right, Left.Y * Right);\n }\n return Operator.deferOperation;\n }\n public get length(): number {\n return Math.sqrt((this.X ** 2) + (this.Y ** 2));\n }\n public get Length(): number {\n return this.length;\n }\n}\n/** A representation of elements in $\\mathbf{R}^3$. */\nexport class FVector {\n public readonly X: number;\n public readonly Y: number;\n public readonly Z: number;\n /** Constructs the zero {@link FVector}. */\n public constructor();\n /**\n * Constructs an {@link FVector} with all components set to {@link Value}.\n *\n * @param Value - The value of all components of the new {@link FVector}.\n */\n public constructor(Value: number);\n /**\n * Constructs an {@link FVector} with all components set to {@link Value}.\n *\n * @param X - The value of the {@link FVector!X} component.\n * @param Y - The value of the {@link FVector!Y} component.\n * @param Z - The value of the {@link FVector!Z} component.\n */\n public constructor(X: number, Y: number, Z: number);\n public constructor(X: number = 0, Y: number = X, Z: number = X) {\n this.X = X;\n this.Y = Y;\n this.Z = Z;\n }\n [Operator.plus](Left: FVector, Right: FVector): FVector {\n return new FVector(Left.X + Right.X, Left.Y + Right.Y, Left.Z + Right.Z);\n }\n [Operator.minus](A: FVector, B: FVector): FVector {\n return new FVector(A.X - B.X, A.Y - B.Y, A.Z - B.Z);\n }\n [Operator.preMinus](Vector: FVector): FVector {\n return new FVector(-1 * Vector.X, -1 * Vector.Y, -1 * Vector.Z);\n }\n [Operator.star](Left: number, Right: FVector): FVector;\n [Operator.star](Left: FVector, Right: number): FVector;\n [Operator.star](Left: FVector | number, Right: FVector | number): FVector | typeof Operator.deferOperation {\n if (typeof Left === \"number\" && Right instanceof FVector) {\n return new FVector(Left * Right.X, Left * Right.Y, Left * Right.Z);\n }\n if (typeof Right === \"number\" && Left instanceof FVector) {\n return new FVector(Left.X * Right, Left.Y * Right, Left.Z * Right);\n }\n return Operator.deferOperation;\n }\n public get length(): number {\n return Math.sqrt((this.X ** 2) + (this.Y ** 2) + (this.Z ** 2));\n }\n public get Length(): number {\n return this.length;\n }\n}\n", "/**\n * @file Math.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/* eslint-disable */\nexport const __DummyExport_Number: \"DummyExport\" = \"DummyExport\" as const;\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Utility.Types.ts\";\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module Npm\n * Utilities for working with `npm` (NodeJS) packages.\n * Many of these likely work with packages of other NodeJS\n * package managers and adjacent runtimes (*e.g.*, `bun` or `deno`).\n */\nexport * from \"./Npm.ts\";\nexport * from \"./Npm.Error.ts\";\n", "/**\n * @file Npm.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { promises as Fs, constants as FsConstants } from \"fs\";\nimport { PackageJsonParseError, RootDirectoryNotFoundError } from \"./Npm.Error.ts\";\nimport { dirname, join } from \"path\";\nimport type { IPackageJson } from \"package-json-type\";\nimport Process from \"process\";\n/**\n * Get the `package.json` of the Node.js project in which the\n * given path, or the current working directory, resides.\n *\n * @param Path - The given path from which to look for a root directory.\n *\n * @throws {RootDirectoryNotFoundError | PackageJsonParseError} An error\n * describing either failure to identify a root directory, or failing to\n * parse the discovered `package.json`.\n *\n * @returns {Promise<IPackageJson>} The {@link IPackageJson} of {@link Path}\n * if provided, otherwise of `process.cwd()`.\n *\n * @example\n * Suppose `process.cwd() === \"./MyPackage\"`,\n * ```typescript\n * const PackageJson: IPackageJson = await GetPackageJson();\n * // `PackageJson` <- *The parsed `package.json` of `MyPackage`.*\n * ```\n */\nexport async function GetPackageJson(Path?: string): Promise<IPackageJson> {\n const RootDirectory: string = await GetPackageRootDirectory(Path);\n const PackageJsonPath: string = join(RootDirectory, \"package.json\");\n const FileContents: string = await Fs.readFile(PackageJsonPath, \"utf-8\");\n const PackageJson: IPackageJson = await (async (): Promise<IPackageJson> => {\n try {\n return JSON.parse(FileContents) as IPackageJson;\n }\n catch (Cause: unknown) {\n throw new PackageJsonParseError({ Cause, Path: PackageJsonPath });\n }\n })();\n return PackageJson;\n}\n/**\n * Get the root directory of the Node.js project in which the\n * current working directory resides.\n *\n * @param Path - The given path from which to look for a root directory.\n *\n * @throws {RootDirectoryNotFoundError} An error iff the root directory\n * of a NodeJS package could not be found.\n *\n * @returns {Promise<string>} The path to the root directory of the package\n * containing {@link Path} if specified, otherwise containing `process.cwd()`.\n *\n * @example\n * Suppose `process.cwd()` is any one of the following,\n * - `/home/alex/myPackage`,\n * - `/home/alex/myPackage/src/MyModule`,\n * - `/home/alex/myPackage/resource/Images`,\n *\n * then,\n *\n * ```typescript\n * const Root: string = await GetPackageRootDirectory();\n * // `Root` <- `\"/home/alex/myPackage\"`\n * ```\n *\n * @example\n * Suppose `TestPath === \"/home/alex/Documents\"` is *not* a NodeJS package root\n * (of course, neither are `/home/alex` or `/home`). Then,\n *\n * ```typescript\n * const TestPath: string = \"/home/alex/Documents\";\n * let Root: string | undefined = undefined;\n * try\n * {\n * Root = await GetPackageRootDirectory(TestPath);\n * }\n * catch (Error: unknown)\n * {\n * // `Error instanceof RootDirectoryNotFound`\n * }\n *\n * // `Root` <- `undefined`\n * ```\n *\n * @example\n * Suppose `process.cwd() === /home/alex/Downloads`, which is *not* a NodeJS package\n * (of course, neither are `/home/alex` or `/home`). Then,\n *\n * ```typescript\n * let Root: string | undefined = undefined;\n * try\n * {\n * Root = await GetPackageRootDirectory();\n * }\n * catch (Error: unknown)\n * {\n * // `Error instanceof RootDirectoryNotFound`\n * }\n * // `Root` <- `undefined`\n * ```\n */\nexport async function GetPackageRootDirectory(Path?: string): Promise<string> {\n let CurrentDirectory: string = await Fs.realpath(Path ?? Process.cwd());\n while (true) {\n const PackageJsonPath: string = join(CurrentDirectory, \"package.json\");\n const PackageJsonExists: boolean = await (async (): Promise<boolean> => {\n try {\n await Fs.access(PackageJsonPath, FsConstants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n })();\n if (PackageJsonExists) {\n return CurrentDirectory;\n }\n const ParentDirectory: string = dirname(CurrentDirectory);\n if (ParentDirectory === CurrentDirectory) {\n throw new RootDirectoryNotFoundError({ Path });\n }\n CurrentDirectory = ParentDirectory;\n }\n}\n", "/**\n * @file Npm.Error.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { Data } from \"effect\";\n/**\n * An error describing that {@link GetPackageJson} failed to parse the discovered `package.json` file.\n *\n * @property {string | undefined} Path - The `Path` argument passed to the effect returning this error,\n * if one was given.\n * @property {unknown} Cause - The cause of this error.\n */\nexport class PackageJsonParseError extends Data.TaggedError(\"PackageJsonParseError\")<{\n readonly Path: string | undefined;\n readonly Cause: unknown;\n}> {\n}\n/**\n * An error describing that {@link GetPackageRootDirectory} failed.\n *\n * @property {string | undefined} Path - The `Path` argument passed to the effect returning\n * this error, if one was given.\n */\nexport class RootDirectoryNotFoundError extends Data.TaggedError(\"RootDirectoryNotFound\")<{\n readonly Path: string | undefined;\n}> {\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Path.ts\";\n", "/**\n * @file Path.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { join } from \"path\";\nimport { Operator } from \"tsover-runtime\";\nexport class FPath {\n public readonly Raw: string;\n public toString(): string {\n return this.Raw;\n }\n public constructor(String: string);\n public constructor(Other: FPath);\n public constructor(Argument: string | FPath) {\n if (typeof Argument === \"string\") {\n this.Raw = Argument;\n }\n else {\n this.Raw = Argument.Raw;\n }\n }\n [Operator.slash](A: FPath, B: FPath): FPath;\n [Operator.slash](A: string, B: FPath): FPath;\n [Operator.slash](A: FPath, B: string): FPath;\n [Operator.slash](A: FPath | string, B: FPath | string): FPath {\n if (typeof A === \"string\") {\n return new FPath(join(A, (B as FPath).Raw));\n }\n else if (typeof B === \"string\") {\n return new FPath(join((A as FPath).Raw, B));\n }\n else {\n return new FPath(join((A as FPath).Raw, (B as FPath).Raw));\n }\n }\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./String.ts\";\n", "/**\n * @file String.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module String\n * Functions for manipulating strings.\n */\n/**\n * @param In - The string that you wish to test.\n * @returns Whether the given string contains *only* (Latin alphabet) letters.\n */\nexport function IsLetters(In: string): boolean {\n return /^[a-zA-Z]*$/.test(In);\n}\n/**\n * @remarks *(This is an alias for `IsOnlyLetters`).*\n *\n * @param In - The string that you wish to test.\n * @returns Whether the given string contains *only* (Latin alphabet) letters.\n */\nexport function IsAlpha(In: string): boolean {\n return IsLetters(In);\n}\n/**\n * @param In - The string that you wish to test.\n * @returns Whether the given string contains *only* numeric digits.\n */\nexport function IsNumeric(In: string): boolean {\n return /^\\d+$/.test(In);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;;;ACgCO,SAAS,cAAuG,OAAuH;AAC1O,SAAO,MAAM,OAAO,CAAC,YAA8C;AAC/D,WAAO,YAAY;AAAA,EACvB,CAAC;AACL;;;ACpCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACqEO,IAAM,0BAAN,cAAsC,MAAM;AAAA,EACxC,YAAY,WAAoB;AACnC,UAAM,SAAS;AAAA,EACnB;AACJ;;;AC/BA,eAAsB,IAAc,QAA6D;AAC7F,MAAI;AACA,UAAMA,QAAiB,OAAO,WAAW,aACnC,MAAM,OAAO,IACb,MAAM;AACZ,WAAO;AAAA,MACH,MAAAA;AAAA,MACA,OAAO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,eAAO;AAAA,MACX;AAAA,IACJ,GAAG;AACH,QAAI,mBAAmB;AACnB,aAAO;AAAA,IACX;AACA,UAAM,sBAA0B,sBAAQ,gBAAgB;AACxD,QAAI,oBAAoB,kBAAkB;AACtC,YAAM,IAAI,2BAA2B,EAAE,KAAK,CAAC;AAAA,IACjD;AACA,uBAAmB;AAAA,EACvB;AACJ;;;AEhIA;AAAA;AAAA;AAAA;;;ACMA,IAAAC,eAAqB;AACrB,IAAAC,yBAAyB;AAClB,IAAM,QAAN,MAAM,OAAM;AAAA,EAER,WAAmB;AACtB,WAAO,KAAK;AAAA,EAChB;AAAA,EAGO,YAAY,UAA0B;AACzC,QAAI,OAAO,aAAa,UAAU;AAC9B,WAAK,MAAM;AAAA,IACf,OACK;AACD,WAAK,MAAM,SAAS;AAAA,IACxB;AAAA,EACJ;AAAA,EAIA,CAAC,gCAAS,KAAK,EAAE,GAAmB,GAA0B;AAC1D,QAAI,OAAO,MAAM,UAAU;AACvB,aAAO,IAAI,WAAM,mBAAK,GAAI,EAAY,GAAG,CAAC;AAAA,IAC9C,WACS,OAAO,MAAM,UAAU;AAC5B,aAAO,IAAI,WAAM,mBAAM,EAAY,KAAK,CAAC,CAAC;AAAA,IAC9C,OACK;AACD,aAAO,IAAI,WAAM,mBAAM,EAAY,KAAM,EAAY,GAAG,CAAC;AAAA,IAC7D;AAAA,EACJ;AACJ;;;ACrCA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,SAAS,UAAU,IAAqB;AAC3C,SAAO,cAAc,KAAK,EAAE;AAChC;AAOO,SAAS,QAAQ,IAAqB;AACzC,SAAO,UAAU,EAAE;AACvB;AAKO,SAAS,UAAU,IAAqB;AAC3C,SAAO,QAAQ,KAAK,EAAE;AAC1B;",
6
6
  "names": ["Data", "import_fs", "Fs", "FsConstants", "os", "import_tsover_runtime", "import_fs", "import_path", "Fs", "Process", "FsConstants", "import_path", "import_tsover_runtime"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../Source/Array/index.ts", "../Source/Array/Array.ts", "../Source/Async/index.ts", "../Source/Miscellaneous/Utility.Types.ts", "../Source/Async/Async.ts", "../Source/Math/Complex.ts", "../Source/Math/Complex.Internal.ts", "../Source/FileSystem/index.ts", "../Source/FileSystem/FileSystem.ts", "../Source/Functional/index.ts", "../Source/Functional/Functional.ts", "../Source/Math/index.ts", "../Source/Math/Index.Complex.ts", "../Source/Math/Vector.ts", "../Source/Math/Math.ts", "../Source/Miscellaneous/index.ts", "../Source/Npm/index.ts", "../Source/Npm/Npm.ts", "../Source/Npm/Npm.Error.ts", "../Source/Path/index.ts", "../Source/Path/Path.ts", "../Source/String/index.ts", "../Source/String/String.ts"],
4
- "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Array.ts\";\nexport * from \"./Array.Types.ts\";\n", "/**\n * @file Array.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type { FilteredArray, Options, TArrayType } from \"./Array.Types.ts\";\nimport type { NoOptions } from \"../Miscellaneous/Utility.Types.ts\";\n/**\n * Filter out all instances of `undefined` from a given {@link Array:param}.\n * @param Array - The array to filter.\n *\n * @template ElementType - The type of the elements in the array.\n *\n * @returns {TArrayType<Exclude<ElementType, undefined>, Exclude<OptionsType, Options.MaybeDefined>>}\n * A new `Array` of type `Exclude<ElementType, undefined>` and `OptionsType` that is the given\n * {@link OptionsType}, with the {@link Options.MaybeDefined} option removed.\n *\n * @example With the given {@link ElementType} including `undefined`.\n * ```typescript\n * const MaybeOddNumbers: TArray<number | undefined> = [ 1, 3, undefined, 5 ];\n * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);\n * ```\n * @example With the given {@link OptionsType} including `Options.MaybeDefined`.\n * ```typescript\n * const MaybeOddNumbers: TArray<number, Options.MaybeDefined> = [ 1, 3, undefined, 5 ];\n * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);\n * ```\n */\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType> {\n return Array.filter((Element: ElementType | undefined): boolean => {\n return Element !== undefined;\n }) as FilteredArray<ElementType>;\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Async.ts\";\nexport * from \"./Async.Types.ts\";\n", "/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type * as TypeScript from \"typescript\";\nimport type { NoOptions } from \"./Utility.Internal.ts\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The union of a given {@link ElementType} and the array of a given {@link ElementType}.\n *\n * @template ElementType - The type of this, or the type of elements contained by this.\n */\nexport type TMaybeArray<ElementType> = ElementType | Array<ElementType>;\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\nexport type FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n", "/**\n * @file Async.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { AbstractMethodCallError, type TNullable } from \"../Miscellaneous/Utility.Types.ts\";\nimport type { TOnFulfilled, TOnRejected, TPromiseCtorArgument, TTryResult, TTrySource } from \"./Async.Types.ts\";\nimport type { TFunction } from \"../Functional/Functional.Types.ts\";\n/**\n * Implements \"Errors-as-values\" for `async` functions and `Promise<DataType>`s.\n *\n * If the `async` function or `Promise<DataType>` returns/resolves, then the `Error`\n * property of the returned object will be `undefined`, and the result of the\n * `async` function or `Promise<DataType>` will reside in the `Data` property of the\n * returned object.\n *\n * Similarly, if the `async` function or `Promise<DataType>` throws, then the `Data`\n * property of the returned object is `undefined`, and the `Error` property is what\n * was thrown to the `catch` block.\n *\n * @template DataType - The type of the data that the `async` function or `Promise<DataType>`.\n * @param Source - The `async` function or `Promise` to evaluate.\n *\n * @returns {TTryResult<DataType>} A {@link TTryResult} containing either the result\n * ({@link TTryResult.Data}) or error {@link TTryResult.Error}.\n *\n * @example\n * // With an `async` function,\n * async function GetName(): Promise<string> { ... }\n * // Or, with a `Promise`,\n * const GetName: Promise<string> = new Promise<string>(...);\n *\n * // For both of the above cases, `Try` behaves the same:\n * const { Data: Name, Error: NameError } = await Try(GetName);\n * // If `GetName` returned,\n * // `typeof Name` <- `\"string\"`\n * // `typeof NameError` <- `\"undefined\"`\n * // If `GetName` threw,\n * // `typeof Name` <- `\"undefined\"`\n * // `NameError !== undefined` <- `true` (Unless `GetName` threw `undefined`).\n */\nexport async function Try<DataType>(Source: TTrySource<DataType>): Promise<TTryResult<DataType>> {\n try {\n const Data: DataType = typeof Source === \"function\"\n ? await Source()\n : await Source;\n return {\n Data,\n Error: undefined\n };\n }\n catch (ErrorValue: unknown) {\n return {\n Data: undefined,\n Error: ErrorValue\n };\n }\n}\n/**\n * A cleaner way of using `Array.prototype.map` with an `async` function.\n *\n * @template ArgumentElementType - The type of the given {@link Elements}.\n * @template ReturnElementType - The type of the `Array` returned by this.\n *\n * @param Elements - The `Array` that will be transformed.\n * @param Mapper - The function that maps each {@link ArgumentElementType}\n * to a {@link ReturnElementType}.\n *\n * @returns {Array<ReturnElementType>} An `Array` of {@link ReturnElementType}.\n *\n * @example\n * In an `async` function,\n * ```typescript\n * const ArgumentElements: Array<ArgumentElementType> = [ ... ];\n * const ToReturnElement = async (Element: ArgumentElementType): Promise<ReturnElementType> => ...;\n * const ReturnElements: Array<ReturnElementType> = await Map(ArgumentElements, ToReturnElement);\n * ```\n */\nexport async function Map<ArgumentElementType, ReturnElementType>(Elements: Array<ArgumentElementType>, Mapper: ((Element: ArgumentElementType) => Promise<ReturnElementType>)): Promise<Array<ReturnElementType>> {\n const MapperWrapped = async (Element: ArgumentElementType): Promise<ReturnElementType> => {\n return Mapper(Element);\n };\n const Out: Array<Promise<ReturnElementType>> = Elements.map(MapperWrapped);\n return await Promise.all(Out);\n}\n/**\n * An abstract implementation of {@link PromiseLike}. This exists only to maintain the\n * project's naming convention.\n */\nexport abstract class TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public then<ResultType = ResolveType, RejectType = never>(_OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, _OnRejected?: TOnRejected<RejectType>): TPromiseLike<ResultType | RejectType> {\n throw new AbstractMethodCallError(\"TPromiseLike\");\n }\n}\n/**\n * The {@link TypeError} that is thrown by the constructor of {@link TPromise}\n * iff it receives an argument that is not a {@link TPromiseCtorArgument}.\n * It does not provide any additional information (in particular, it does not\n * add any properties, and it does not set any properties inherited from\n * {@link TypeError}).\n *\n * @note While the argument type of {@link TPromise}'s constructor is checked at runtime,\n * the type checker should prevent the error described by this from happening.\n */\nexport class FPromiseInstantiationError extends TypeError {\n public constructor() {\n super();\n }\n}\n/**\n * A `then`-able wrapper of {@link Promise}.\n *\n * @template ResolveType - The type to which this resolves, if it does resolve.\n */\nexport class TPromise<ResolveType> extends TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public constructor(Argument: TPromiseCtorArgument<ResolveType>) {\n super();\n if (typeof Argument === \"function\") {\n this.Underlying = new Promise<ResolveType>(Argument);\n }\n else {\n if (Argument instanceof TPromise) {\n this.Underlying = Argument.Raw();\n }\n else if (Argument instanceof Promise) {\n this.Underlying = Argument;\n }\n }\n throw new FPromiseInstantiationError();\n }\n private readonly Underlying: Promise<ResolveType>;\n /**\n * This class's extension of {@link Promise!then}.\n *\n * @template ResultType - The type to which the value underlying the {@link TPromise} returned by this\n * will resolve, if the {@link TPromise} resolves.\n *\n * @template RejectType - The type to which the value underlying the {@link TPromise} returned by this\n * will reject, if the {@link TPromise} rejects.\n *\n * @param OnFulfilled - The callback that is called when the underlying {@link Promise} resolves,\n * if it resolves.\n *\n * @param OnRejected - The callback that is called when the underlying {@link Promise} rejects,\n * if it rejects.\n *\n * @returns {TPromise<ResultType | RejectType>} A new {@link TPromise} of the result of the\n * given callbacks.\n *\n * @example\n * ```typescript\n * const Example: TPromise<string> = new TPromise<string>((Resolve, Reject) =>\n * {\n * if (Math.random() < 0.5)\n * {\n * Resolve(\"Success\");\n * }\n * else\n * {\n * Reject(\"Error\");\n * }\n * });\n *\n * Example.then(\n * (Value: string): void =>\n * {\n * // `Value` <- `\"Success\"`\n * },\n * (Reason: unknown): void =>\n * {\n * // `Reason` <- `\"Error\"`\n * }\n * );\n * ```\n */\n public Then<ResultType = ResolveType, RejectType = never>(OnFulfilled: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public override then<ResultType = ResolveType, RejectType = never>(OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public Catch<ResultType = never>(OnRejected?: TNullable<TOnRejected<ResolveType>>): TPromiseLike<ResolveType | ResultType> {\n return new TPromise<ResolveType | ResultType>(this.Underlying.catch(OnRejected));\n }\n public Finally(OnFinally?: TNullable<TFunction>): TPromise<ResolveType> {\n return new TPromise(this.Underlying.finally(OnFinally));\n }\n public static Resolve<ResolveType>(Value: ResolveType | PromiseLike<ResolveType>): TPromise<Awaited<ResolveType>> {\n return new TPromise(Promise.resolve(Value));\n }\n public static Reject<ResolveType = unknown>(Reason?: unknown): TPromise<ResolveType> {\n return new TPromise(Promise.reject<ResolveType>(Reason));\n }\n public Raw(): Promise<ResolveType> {\n return this.Underlying;\n }\n}\n;\n", "/**\n * @file Complex.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { MathBuiltin } from \"./Complex.Internal\";\nimport { Operator } from \"tsover-runtime\";\n/**\n * Elements of the complex plane, $\\mathbf{C} = \\mathbf{R}[x] / [ x^2 + 1 ]$.\n */\nexport class FComplex {\n public readonly Re: number;\n public readonly Im: number;\n public static Zero: FComplex = new FComplex(0, 0);\n /**\n * The copy constructor for {@link FComplex} numbers.\n *\n * @param Z - The existing {@link FComplex} number to copy.\n *\n * @example\n * ```typescript\n * const Z: FComplex = 3 + 2 * i;\n * const W: FComplex = new FComplex(Z);\n * // `W.Re === Z.Re` <- `true`\n * // `W.Im === Z.Im` <- `true`\n * ```\n */\n public constructor(Z: FComplex);\n /**\n * Construct an {@link FComplex} number by specifying the real\n * and imaginary components.\n *\n * @param A - The real component of the {@link FComplex} number.\n * @param B - The imaginary component of the {@link FComplex} number.\n *\n * @example\n * ```typescript\n * const Theta: number = 0.5;\n * const OnUnitDisk: FComplex = new FComplex(Math.sin(Theta), Math.cos(Theta));\n * ```\n */\n public constructor(A: number, B: number);\n public constructor(A: FComplex | number, B: number = 0) {\n if (typeof A === \"number\") {\n this.Re = A;\n this.Im = B;\n }\n else {\n this.Re = A.Re;\n this.Im = A.Im;\n }\n }\n /**\n * Get the modulus of this {@link FComplex} number.\n *\n * @returns {number} The modulus of this {@link FComplex} number.\n */\n public get Mod(): number {\n return MathBuiltin.sqrt((this.Re ** 2) + (this.Im ** 2));\n }\n /**\n * Get the modulus of this {@link FComplex} number.\n *\n * @returns {number} The modulus of this {@link FComplex} number.\n */\n public get Theta(): number {\n const Out: number = MathBuiltin.atan2(this.Im, this.Re);\n if (Out < 0) {\n return Out + 2 * MathBuiltin.PI;\n }\n return Out;\n }\n [Operator.star](A: FComplex, B: FComplex): FComplex;\n [Operator.star](A: FComplex, B: number): FComplex;\n [Operator.star](A: number, B: FComplex): FComplex;\n [Operator.star](A: FComplex | number, B: number | FComplex): FComplex {\n if (typeof A === \"number\") {\n return new FComplex((B as FComplex).Re * A, (B as FComplex).Im * A);\n }\n else if (typeof B === \"number\") {\n return new FComplex((A as FComplex).Re * B, (A as FComplex).Im * B);\n }\n else {\n return new FComplex((((A as FComplex).Re + (B as FComplex).Re) -\n ((A as FComplex).Im + (B as FComplex).Im)), (((A as FComplex).Re + (B as FComplex).Im) +\n ((B as FComplex).Re + (A as FComplex).Im)));\n }\n }\n [Operator.plus](A: FComplex, B: FComplex): FComplex;\n [Operator.plus](A: FComplex, B: number): FComplex;\n [Operator.plus](A: number, B: FComplex): FComplex;\n [Operator.plus](A: FComplex | number, B: number | FComplex): FComplex {\n if (typeof A === \"number\") {\n return new FComplex(A + (B as FComplex).Re, (B as FComplex).Im);\n }\n else if (typeof B === \"number\") {\n return new FComplex((A as FComplex).Re + B, (A as FComplex).Im);\n }\n else {\n return new FComplex((A as FComplex).Re + (B as FComplex).Re, (A as FComplex).Im + (B as FComplex).Im);\n }\n }\n}\nexport /**\n * The imaginary unit.\n */ const i: FComplex = new FComplex(0, 1);\n", "/**\n * @file Complex.Internal.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport const MathBuiltin: typeof Math = Math;\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./FileSystem.ts\";\nexport * from \"./FileSystem.Types.ts\";\n", "/**\n * @file FileSystem.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { basename, dirname, extname, join } from \"path\";\nimport { type FFileExtension } from \"./FileSystem.Types.ts\";\nimport { type FileHandle } from \"fs/promises\";\nimport { promises as Fs } from \"fs\";\nimport { constants as FsConstants } from \"fs\";\nimport os from \"os\";\nasync function PathExists(Path: string): Promise<boolean> {\n try {\n await Fs.access(Path, FsConstants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * @param Extension - The file extension that you wish to test.\n * @returns Whether the file extension is valid on the current platform.\n */\nexport function IsSupportedFileExtension(Extension: FFileExtension): boolean {\n let NormalizedExtension: string = Extension.slice(1);\n if (NormalizedExtension.startsWith(\".\")) {\n NormalizedExtension = NormalizedExtension.slice(1);\n }\n if (NormalizedExtension.length === 0) {\n return false;\n }\n if (NormalizedExtension.includes(\"/\")\n || NormalizedExtension.includes(\"\\\\\")\n || NormalizedExtension.includes(\"\\0\")) {\n return false;\n }\n if (os.platform() === \"win32\") {\n /* eslint-disable-next-line no-control-regex */\n const HasIllegalCharacters: boolean = /[<>:\"/\\\\|?*\\x00-\\x1F]/u.test(NormalizedExtension);\n if (HasIllegalCharacters) {\n return false;\n }\n if (/[ .]$/u.test(NormalizedExtension)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Given a path at which we wish to create a new file, check if a file at that\n * path already exists, and if so, then append `(${ number })` before the file\n * extension, consistent with the Windows Explorer handles conflicting file\n * names when pasting files.\n */\nexport async function GetSafeNewPath(InPath: string): Promise<string> {\n const DirectoryPath: string = dirname(InPath);\n const Extension: string = extname(InPath);\n const FileName: string = basename(InPath);\n const BaseFileName: string = Extension === \"\"\n ? FileName\n : basename(InPath, Extension);\n let CandidatePath: string = InPath;\n let Index: number = 1;\n while (await PathExists(CandidatePath)) {\n const CandidateFileName: string = `${BaseFileName} (${Index})${Extension}`;\n CandidatePath = join(DirectoryPath, CandidateFileName);\n Index++;\n }\n return CandidatePath;\n}\n/**\n * @param DirectoryPath - The path to the directory in which you wish to check.\n * @param FileName - The desired file name.\n * @param PersistNewFile - *(Optional)* Whether to keep the otherwise-temporary\n * file created at the desired path.\n * @param Extension - *(Optional)* If provided, the function will only return `true`\n * if `FileName.endsWith(Extension)` *and* the `Extension` is a valid\n * file extension.\n * @returns Whether a file of the given `FileName` can be created in `DirectoryPath`.\n *\n * @remarks This *does* attempt to create a file at the desired path. The file is\n * temporary iff `!PersistNewFile`, and is never created when this function\n * returns `false`.\n */\nexport async function IsValidFileName(DirectoryPath: string, FileName: string, PersistNewFile: boolean = false, Extension: FFileExtension | undefined = undefined): Promise<boolean> {\n const ExtensionSafe: FFileExtension | null | \"\" = Extension !== undefined\n ? (Extension.startsWith(\".\") && IsSupportedFileExtension(Extension))\n ? Extension\n : null\n : \"\";\n const IsExtensionImproper: boolean = (ExtensionSafe === null ||\n ExtensionSafe === \".\" ||\n !FileName.endsWith(ExtensionSafe));\n if (IsExtensionImproper) {\n return false;\n }\n const FilePath: string = join(DirectoryPath, FileName);\n try {\n const ThisFileHandle: FileHandle = await Fs.open(FilePath, \"wx\");\n await ThisFileHandle.close();\n if (!PersistNewFile) {\n await Fs.unlink(FilePath);\n }\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * Write a text file to a given {@link Path} having contents {@link Contents}.\n *\n * @param Path - The path of the file that will be written.\n * @param Contents - The text contents of the file to write.\n *\n * @returns {Promise<void>} A {@link Promise} that resolves when the call to {@link Fs.writeFile} resolves.\n *\n * @example\n * ```typescript\n * import { WriteTextFile } from \"@sorrell/utilities/fs\";\n * import { resolve } from \"path\";\n *\n * const MyReadMe: string = \"# ReadMe\\n\\nThis package accomplishes...\\n\";\n * const MyReadMePath: string = resolve(\".\");\n *\n * await WriteTextFile(MyReadMePath, MyReadMe);\n * ```\n */\nexport async function WriteTextFile(Path: string, Contents: string): Promise<void> {\n await Fs.writeFile(Path, Contents, { encoding: \"utf-8\" });\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Functional.ts\";\nexport * from \"./Functional.Types.ts\";\n", "/**\n * @file Functional.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { CurriedArgument } from \"./Functional.Internal\";\nimport type { FCurriedArgument } from \"./Functional.Internal.Types\";\nimport type { TFunction } from \"./Functional.Types\";\nexport function Identity<Type>(...Arguments: Array<Type>) {\n return Arguments;\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module Math\n * Functions, types, and classes for mathematical computations.\n */\nexport * as Complex from \"./Index.Complex.ts\";\nexport * as Vector from \"./Vector.ts\";\nexport * from \"./Math.ts\";\nexport * from \"./Math.Types.ts\";\n", "/**\n * @file Index.Complex.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Complex.ts\";\nexport * from \"./Complex.Types.ts\";\n", "/**\n * @file Vector.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { Operator } from \"tsover-runtime\";\n/** A representation of elements in $\\mathbf{R}^2$. */\nexport class FVector2D {\n /** The $x$-component of this vector. */\n public readonly X: number;\n /** The $y$-component of this vector. */\n public readonly Y: number;\n /** The identity of $\\mathbf{R}^2$ *wrt* addition. */\n public static Zero: FVector2D = new FVector2D(0, 0);\n /**\n * Construct a vector by specifying both components.\n *\n * @param Value - The value of both the {@link FVector2D!X | x}- and\n * {@link FVector2D!Y ? y}-components.\n */\n public constructor(Value: number);\n /**\n * Construct a vector by specifying both components.\n *\n * @param X - The value of the {@link FVector2D!X} component.\n * @param Y - The value of the {@link FVector2D!Y} component.\n */\n public constructor(X: number, Y: number);\n public constructor(X: number = 0, Y: number = X) {\n this.X = X;\n this.Y = Y;\n }\n /**\n * Get a representation of this vector as a `string`.\n *\n * @returns {string} The string representation of this vector.\n */\n public toString(): string {\n return `(${this.X}, ${this.Y})`;\n }\n /**\n * Perform per-component addition of two {@link FVector2D}s.\n *\n * @param Left - The left-hand operand.\n * @param Right - The right-hand operand.\n *\n * @returns {FVector2D} The per-component sum of {@link Left} and {@link Right}.\n *\n * @example\n * ```typescript\n * \"use tsover\";\n *\n * const A: FVector2D = new FVector2D(1, -1);\n * const B: FVector2D = new FVector2D(-3, 5);\n *\n * const C: FVector2D = A + B;\n * // `C` <- `(-2, 4)`\n * ```\n */\n [Operator.plus](Left: FVector2D, Right: FVector2D): FVector2D {\n return new FVector2D(Left.X + Right.X, Left.Y + Right.Y);\n }\n [Operator.minus](A: FVector2D, B: FVector2D): FVector2D {\n return new FVector2D(A.X - B.X, A.Y - B.Y);\n }\n [Operator.preMinus](Vector: FVector2D): FVector2D {\n return new FVector2D(-1 * Vector.X, -1 * Vector.Y);\n }\n /**\n * Perform scalar multiplication of an {@link FVector2D} and a `number` value.\n * Exactly one of the two arguments must be a `number`, and the other an\n * {@link FVector2D}.\n *\n * @param Left - The left-hand operand (either a `number` or an {@link FVector2D}).\n * @param Left - The right-hand operand (either a `number` or an {@link FVector2D}).\n *\n * @returns {FVector2D} The per-component sum of {@link Left} and {@link Right}.\n */\n [Operator.star](Left: number, Right: FVector2D): FVector2D;\n [Operator.star](Left: FVector2D, Right: number): FVector2D;\n [Operator.star](Left: FVector2D | number, Right: FVector2D | number): FVector2D | typeof Operator.deferOperation {\n if (typeof Left === \"number\" && Right instanceof FVector2D) {\n return new FVector2D(Left * Right.X, Left * Right.Y);\n }\n if (typeof Right === \"number\" && Left instanceof FVector2D) {\n return new FVector2D(Left.X * Right, Left.Y * Right);\n }\n return Operator.deferOperation;\n }\n public get length(): number {\n return Math.sqrt((this.X ** 2) + (this.Y ** 2));\n }\n public get Length(): number {\n return this.length;\n }\n}\n/** A representation of elements in $\\mathbf{R}^3$. */\nexport class FVector {\n public readonly X: number;\n public readonly Y: number;\n public readonly Z: number;\n /** Constructs the zero {@link FVector}. */\n public constructor();\n /**\n * Constructs an {@link FVector} with all components set to {@link Value}.\n *\n * @param Value - The value of all components of the new {@link FVector}.\n */\n public constructor(Value: number);\n /**\n * Constructs an {@link FVector} with all components set to {@link Value}.\n *\n * @param X - The value of the {@link FVector!X} component.\n * @param Y - The value of the {@link FVector!Y} component.\n * @param Z - The value of the {@link FVector!Z} component.\n */\n public constructor(X: number, Y: number, Z: number);\n public constructor(X: number = 0, Y: number = X, Z: number = X) {\n this.X = X;\n this.Y = Y;\n this.Z = Z;\n }\n [Operator.plus](Left: FVector, Right: FVector): FVector {\n return new FVector(Left.X + Right.X, Left.Y + Right.Y, Left.Z + Right.Z);\n }\n [Operator.minus](A: FVector, B: FVector): FVector {\n return new FVector(A.X - B.X, A.Y - B.Y, A.Z - B.Z);\n }\n [Operator.preMinus](Vector: FVector): FVector {\n return new FVector(-1 * Vector.X, -1 * Vector.Y, -1 * Vector.Z);\n }\n [Operator.star](Left: number, Right: FVector): FVector;\n [Operator.star](Left: FVector, Right: number): FVector;\n [Operator.star](Left: FVector | number, Right: FVector | number): FVector | typeof Operator.deferOperation {\n if (typeof Left === \"number\" && Right instanceof FVector) {\n return new FVector(Left * Right.X, Left * Right.Y, Left * Right.Z);\n }\n if (typeof Right === \"number\" && Left instanceof FVector) {\n return new FVector(Left.X * Right, Left.Y * Right, Left.Z * Right);\n }\n return Operator.deferOperation;\n }\n public get length(): number {\n return Math.sqrt((this.X ** 2) + (this.Y ** 2) + (this.Z ** 2));\n }\n public get Length(): number {\n return this.length;\n }\n}\n", "/**\n * @file Math.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/* eslint-disable */\nexport const __DummyExport_Number: \"DummyExport\" = \"DummyExport\" as const;\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Utility.Types.ts\";\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module Npm\n * Utilities for working with `npm` (NodeJS) packages.\n * Many of these likely work with packages of other NodeJS\n * package managers and adjacent runtimes (*e.g.*, `bun` or `deno`).\n */\nexport * from \"./Npm.ts\";\nexport * from \"./Npm.Error.ts\";\n", "/**\n * @file Npm.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { promises as Fs, constants as FsConstants } from \"fs\";\nimport { PackageJsonParseError, RootDirectoryNotFoundError } from \"./Npm.Error.ts\";\nimport { dirname, join } from \"path\";\nimport type { IPackageJson } from \"package-json-type\";\nimport Process from \"process\";\n/**\n * Get the `package.json` of the Node.js project in which the\n * given path, or the current working directory, resides.\n *\n * @param Path - The given path from which to look for a root directory.\n *\n * @throws {RootDirectoryNotFoundError | PackageJsonParseError} An error\n * describing either failure to identify a root directory, or failing to\n * parse the discovered `package.json`.\n *\n * @returns {Promise<IPackageJson>} The {@link IPackageJson} of {@link Path}\n * if provided, otherwise of `process.cwd()`.\n *\n * @example\n * Suppose `process.cwd() === \"./MyPackage\"`,\n * ```typescript\n * const PackageJson: IPackageJson = await GetPackageJson();\n * // `PackageJson` <- *The parsed `package.json` of `MyPackage`.*\n * ```\n */\nexport async function GetPackageJson(Path?: string): Promise<IPackageJson> {\n const RootDirectory: string = await GetPackageRootDirectory(Path);\n const PackageJsonPath: string = join(RootDirectory, \"package.json\");\n const FileContents: string = await Fs.readFile(PackageJsonPath, \"utf-8\");\n const PackageJson: IPackageJson = await (async (): Promise<IPackageJson> => {\n try {\n return JSON.parse(FileContents) as IPackageJson;\n }\n catch (Cause: unknown) {\n throw new PackageJsonParseError({ Cause, Path: PackageJsonPath });\n }\n })();\n return PackageJson;\n}\n/**\n * Get the root directory of the Node.js project in which the\n * current working directory resides.\n *\n * @param Path - The given path from which to look for a root directory.\n *\n * @throws {RootDirectoryNotFoundError} An error iff the root directory\n * of a NodeJS package could not be found.\n *\n * @returns {Promise<string>} The path to the root directory of the package\n * containing {@link Path} if specified, otherwise containing `process.cwd()`.\n *\n * @example\n * Suppose `process.cwd()` is any one of the following,\n * - `/home/alex/myPackage`,\n * - `/home/alex/myPackage/src/MyModule`,\n * - `/home/alex/myPackage/resource/Images`,\n *\n * then,\n *\n * ```typescript\n * const Root: string = await GetPackageRootDirectory();\n * // `Root` <- `\"/home/alex/myPackage\"`\n * ```\n *\n * @example\n * Suppose `TestPath === \"/home/alex/Documents\"` is *not* a NodeJS package root\n * (of course, neither are `/home/alex` or `/home`). Then,\n *\n * ```typescript\n * const TestPath: string = \"/home/alex/Documents\";\n * let Root: string | undefined = undefined;\n * try\n * {\n * Root = await GetPackageRootDirectory(TestPath);\n * }\n * catch (Error: unknown)\n * {\n * // `Error instanceof RootDirectoryNotFound`\n * }\n *\n * // `Root` <- `undefined`\n * ```\n *\n * @example\n * Suppose `process.cwd() === /home/alex/Downloads`, which is *not* a NodeJS package\n * (of course, neither are `/home/alex` or `/home`). Then,\n *\n * ```typescript\n * let Root: string | undefined = undefined;\n * try\n * {\n * Root = await GetPackageRootDirectory();\n * }\n * catch (Error: unknown)\n * {\n * // `Error instanceof RootDirectoryNotFound`\n * }\n * // `Root` <- `undefined`\n * ```\n */\nexport async function GetPackageRootDirectory(Path?: string): Promise<string> {\n let CurrentDirectory: string = await Fs.realpath(Path ?? Process.cwd());\n while (true) {\n const PackageJsonPath: string = join(CurrentDirectory, \"package.json\");\n const PackageJsonExists: boolean = await (async (): Promise<boolean> => {\n try {\n await Fs.access(PackageJsonPath, FsConstants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n })();\n if (PackageJsonExists) {\n return CurrentDirectory;\n }\n const ParentDirectory: string = dirname(CurrentDirectory);\n if (ParentDirectory === CurrentDirectory) {\n throw new RootDirectoryNotFoundError({ Path });\n }\n CurrentDirectory = ParentDirectory;\n }\n}\n", "/**\n * @file Npm.Error.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { Data } from \"effect\";\n/**\n * An error describing that {@link GetPackageJson} failed to parse the discovered `package.json` file.\n *\n * @property {string | undefined} Path - The `Path` argument passed to the effect returning this error,\n * if one was given.\n * @property {unknown} Cause - The cause of this error.\n */\nexport class PackageJsonParseError extends Data.TaggedError(\"PackageJsonParseError\")<{\n readonly Path: string | undefined;\n readonly Cause: unknown;\n}> {\n}\n/**\n * An error describing that {@link GetPackageRootDirectory} failed.\n *\n * @property {string | undefined} Path - The `Path` argument passed to the effect returning\n * this error, if one was given.\n */\nexport class RootDirectoryNotFoundError extends Data.TaggedError(\"RootDirectoryNotFound\")<{\n readonly Path: string | undefined;\n}> {\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Path.ts\";\n", "/**\n * @file Path.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { join } from \"path\";\nimport { Operator } from \"tsover-runtime\";\nexport class FPath {\n public readonly Raw: string;\n public toString(): string {\n return this.Raw;\n }\n public constructor(String: string);\n public constructor(Other: FPath);\n public constructor(Argument: string | FPath) {\n if (typeof Argument === \"string\") {\n this.Raw = Argument;\n }\n else {\n this.Raw = Argument.Raw;\n }\n }\n [Operator.slash](A: FPath, B: FPath): FPath;\n [Operator.slash](A: string, B: FPath): FPath;\n [Operator.slash](A: FPath, B: string): FPath;\n [Operator.slash](A: FPath | string, B: FPath | string): FPath {\n if (typeof A === \"string\") {\n return new FPath(join(A, (B as FPath).Raw));\n }\n else if (typeof B === \"string\") {\n return new FPath(join((A as FPath).Raw, B));\n }\n else {\n return new FPath(join((A as FPath).Raw, (B as FPath).Raw));\n }\n }\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./String.ts\";\n", "/**\n * @file String.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module String\n * Functions for manipulating strings.\n */\n/**\n * @param In - The string that you wish to test.\n * @returns Whether the given string contains *only* (Latin alphabet) letters.\n */\nexport function IsLetters(In: string): boolean {\n return /^[a-zA-Z]*$/.test(In);\n}\n/**\n * @remarks *(This is an alias for `IsOnlyLetters`).*\n *\n * @param In - The string that you wish to test.\n * @returns Whether the given string contains *only* (Latin alphabet) letters.\n */\nexport function IsAlpha(In: string): boolean {\n return IsLetters(In);\n}\n/**\n * @param In - The string that you wish to test.\n * @returns Whether the given string contains *only* numeric digits.\n */\nexport function IsNumeric(In: string): boolean {\n return /^\\d+$/.test(In);\n}\n"],
5
- "mappings": ";;;;;;;AAAA;AAAA;AAAA;AAAA;;;ACgCO,SAAS,cAAuG,OAAuH;AAC1O,SAAO,MAAM,OAAO,CAAC,YAA8C;AAC/D,WAAO,YAAY;AAAA,EACvB,CAAC;AACL;;;ACpCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC0EO,IAAM,0BAAN,cAAsC,MAAM;AAAA,EACxC,YAAY,WAAoB;AACnC,UAAM,SAAS;AAAA,EACnB;AACJ;;;ACpCA,eAAsB,IAAc,QAA6D;AAC7F,MAAI;AACA,UAAMA,QAAiB,OAAO,WAAW,aACnC,MAAM,OAAO,IACb,MAAM;AACZ,WAAO;AAAA,MACH,MAAAA;AAAA,MACA,OAAO;AAAA,IACX;AAAA,EACJ,SACO,YAAqB;AACxB,WAAO;AAAA,MACH,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,EACJ;AACJ;AAqBA,eAAsB,IAA4C,UAAsC,QAA2G;AAC/M,QAAM,gBAAgB,OAAO,YAA6D;AACtF,WAAO,OAAO,OAAO;AAAA,EACzB;AACA,QAAM,MAAyC,SAAS,IAAI,aAAa;AACzE,SAAO,MAAM,QAAQ,IAAI,GAAG;AAChC;AAKO,IAAe,eAAf,MAA6E;AAAA,EACzE,KAAmD,cAAsD,aAA8E;AAC1L,UAAM,IAAI,wBAAwB,cAAc;AAAA,EACpD;AACJ;AAWO,IAAM,6BAAN,cAAyC,UAAU;AAAA,EAC/C,cAA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,WAAK,MAAM;AAAA,IACf,OACK;AACD,WAAK,MAAM,SAAS;AAAA,IACxB;AAAA,EACJ;AAAA,EAIA,CAACA,UAAS,KAAK,EAAE,GAAmB,GAA0B;AAC1D,QAAI,OAAO,MAAM,UAAU;AACvB,aAAO,IAAI,OAAMD,MAAK,GAAI,EAAY,GAAG,CAAC;AAAA,IAC9C,WACS,OAAO,MAAM,UAAU;AAC5B,aAAO,IAAI,OAAMA,MAAM,EAAY,KAAK,CAAC,CAAC;AAAA,IAC9C,OACK;AACD,aAAO,IAAI,OAAMA,MAAM,EAAY,KAAM,EAAY,GAAG,CAAC;AAAA,IAC7D;AAAA,EACJ;AACJ;;;ACrCA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,SAAS,UAAU,IAAqB;AAC3C,SAAO,cAAc,KAAK,EAAE;AAChC;AAOO,SAAS,QAAQ,IAAqB;AACzC,SAAO,UAAU,EAAE;AACvB;AAKO,SAAS,UAAU,IAAqB;AAC3C,SAAO,QAAQ,KAAK,EAAE;AAC1B;",
4
+ "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Array.ts\";\nexport * from \"./Array.Types.ts\";\n", "/**\n * @file Array.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type { FilteredArray, Options, TArrayType } from \"./Array.Types.ts\";\nimport type { NoOptions } from \"../Miscellaneous/Utility.Types.ts\";\n/**\n * Filter out all instances of `undefined` from a given {@link Array:param}.\n * @param Array - The array to filter.\n *\n * @template ElementType - The type of the elements in the array.\n *\n * @returns {TArrayType<Exclude<ElementType, undefined>, Exclude<OptionsType, Options.MaybeDefined>>}\n * A new `Array` of type `Exclude<ElementType, undefined>` and `OptionsType` that is the given\n * {@link OptionsType}, with the {@link Options.MaybeDefined} option removed.\n *\n * @example With the given {@link ElementType} including `undefined`.\n * ```typescript\n * const MaybeOddNumbers: TArray<number | undefined> = [ 1, 3, undefined, 5 ];\n * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);\n * ```\n * @example With the given {@link OptionsType} including `Options.MaybeDefined`.\n * ```typescript\n * const MaybeOddNumbers: TArray<number, Options.MaybeDefined> = [ 1, 3, undefined, 5 ];\n * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);\n * ```\n */\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType> {\n return Array.filter((Element: ElementType | undefined): boolean => {\n return Element !== undefined;\n }) as FilteredArray<ElementType>;\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Async.ts\";\nexport * from \"./Async.Types.ts\";\n", "/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type { NoOptions } from \"./Utility.Internal.ts\";\nimport type TypeScript from \"typescript\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\n/** An error that is thrown in default implementations of `abstract` `class`es. */\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\ntype FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n/**\n * Maps a given {@link RecordLike} type to an identical {@link Record} type, but\n * the properties are wrapped with {@link NonNullable}.\n *\n * @template RecordLike - The `Record`-like type from which this type is defined.\n */\nexport type TRecordNonNullable<RecordLike> = {\n [Key in keyof RecordLike]: NonNullable<RecordLike[Key]>;\n};\n", "/**\n * @file Async.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { AbstractMethodCallError, type TNullable } from \"../Miscellaneous/Utility.Types.ts\";\nimport type { TOnFulfilled, TOnRejected, TPromiseCtorArgument, TTryResult, TTrySource } from \"./Async.Types.ts\";\nimport type { TFunction } from \"../Functional/Functional.Types.ts\";\n/**\n * Implements \"Errors-as-values\" for `async` functions and `Promise<DataType>`s.\n *\n * If the `async` function or `Promise<DataType>` returns/resolves, then the `Error`\n * property of the returned object will be `undefined`, and the result of the\n * `async` function or `Promise<DataType>` will reside in the `Data` property of the\n * returned object.\n *\n * Similarly, if the `async` function or `Promise<DataType>` throws, then the `Data`\n * property of the returned object is `undefined`, and the `Error` property is what\n * was thrown to the `catch` block.\n *\n * @template DataType - The type of the data that the `async` function or `Promise<DataType>`.\n * @param Source - The `async` function or `Promise` to evaluate.\n *\n * @returns {TTryResult<DataType>} A {@link TTryResult} containing either the result\n * ({@link TTryResult.Data}) or error {@link TTryResult.Error}.\n *\n * @example\n * // With an `async` function,\n * async function GetName(): Promise<string> { ... }\n * // Or, with a `Promise`,\n * const GetName: Promise<string> = new Promise<string>(...);\n *\n * // For both of the above cases, `Try` behaves the same:\n * const { Data: Name, Error: NameError } = await Try(GetName);\n * // If `GetName` returned,\n * // `typeof Name` <- `\"string\"`\n * // `typeof NameError` <- `\"undefined\"`\n * // If `GetName` threw,\n * // `typeof Name` <- `\"undefined\"`\n * // `NameError !== undefined` <- `true` (Unless `GetName` threw `undefined`).\n */\nexport async function Try<DataType>(Source: TTrySource<DataType>): Promise<TTryResult<DataType>> {\n try {\n const Data: DataType = typeof Source === \"function\"\n ? await Source()\n : await Source;\n return {\n Data,\n Error: undefined\n };\n }\n catch (ErrorValue: unknown) {\n return {\n Data: undefined,\n Error: ErrorValue\n };\n }\n}\n/**\n * A cleaner way of using `Array.prototype.map` with an `async` function.\n *\n * @template ArgumentElementType - The type of the given {@link Elements}.\n * @template ReturnElementType - The type of the `Array` returned by this.\n *\n * @param Elements - The `Array` that will be transformed.\n * @param Mapper - The function that maps each {@link ArgumentElementType}\n * to a {@link ReturnElementType}.\n *\n * @returns {Array<ReturnElementType>} An `Array` of {@link ReturnElementType}.\n *\n * @example\n * In an `async` function,\n * ```typescript\n * const ArgumentElements: Array<ArgumentElementType> = [ ... ];\n * const ToReturnElement = async (Element: ArgumentElementType): Promise<ReturnElementType> => ...;\n * const ReturnElements: Array<ReturnElementType> = await Map(ArgumentElements, ToReturnElement);\n * ```\n */\nexport async function Map<ArgumentElementType, ReturnElementType>(Elements: Array<ArgumentElementType>, Mapper: ((Element: ArgumentElementType) => Promise<ReturnElementType>)): Promise<Array<ReturnElementType>> {\n const MapperWrapped = async (Element: ArgumentElementType): Promise<ReturnElementType> => {\n return Mapper(Element);\n };\n const Out: Array<Promise<ReturnElementType>> = Elements.map(MapperWrapped);\n return await Promise.all(Out);\n}\n/**\n * An abstract implementation of {@link PromiseLike}. This exists only to maintain the\n * project's naming convention.\n */\nexport abstract class TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public then<ResultType = ResolveType, RejectType = never>(_OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, _OnRejected?: TOnRejected<RejectType>): TPromiseLike<ResultType | RejectType> {\n throw new AbstractMethodCallError(\"TPromiseLike\");\n }\n}\n/**\n * The {@link TypeError} that is thrown by the constructor of {@link TPromise}\n * iff it receives an argument that is not a {@link TPromiseCtorArgument}.\n * It does not provide any additional information (in particular, it does not\n * add any properties, and it does not set any properties inherited from\n * {@link TypeError}).\n *\n * @note While the argument type of {@link TPromise}'s constructor is checked at runtime,\n * the type checker should prevent the error described by this from happening.\n */\nexport class FPromiseInstantiationError extends TypeError {\n public constructor() {\n super();\n }\n}\n/**\n * A `then`-able wrapper of {@link Promise}.\n *\n * @template ResolveType - The type to which this resolves, if it does resolve.\n */\nexport class TPromise<ResolveType> extends TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public constructor(Argument: TPromiseCtorArgument<ResolveType>) {\n super();\n if (typeof Argument === \"function\") {\n this.Underlying = new Promise<ResolveType>(Argument);\n }\n else {\n if (Argument instanceof TPromise) {\n this.Underlying = Argument.Raw();\n }\n else if (Argument instanceof Promise) {\n this.Underlying = Argument;\n }\n }\n throw new FPromiseInstantiationError();\n }\n private readonly Underlying: Promise<ResolveType>;\n /**\n * This class's extension of {@link Promise!then}.\n *\n * @template ResultType - The type to which the value underlying the {@link TPromise} returned by this\n * will resolve, if the {@link TPromise} resolves.\n *\n * @template RejectType - The type to which the value underlying the {@link TPromise} returned by this\n * will reject, if the {@link TPromise} rejects.\n *\n * @param OnFulfilled - The callback that is called when the underlying {@link Promise} resolves,\n * if it resolves.\n *\n * @param OnRejected - The callback that is called when the underlying {@link Promise} rejects,\n * if it rejects.\n *\n * @returns {TPromise<ResultType | RejectType>} A new {@link TPromise} of the result of the\n * given callbacks.\n *\n * @example\n * ```typescript\n * const Example: TPromise<string> = new TPromise<string>((Resolve, Reject) =>\n * {\n * if (Math.random() < 0.5)\n * {\n * Resolve(\"Success\");\n * }\n * else\n * {\n * Reject(\"Error\");\n * }\n * });\n *\n * Example.then(\n * (Value: string): void =>\n * {\n * // `Value` <- `\"Success\"`\n * },\n * (Reason: unknown): void =>\n * {\n * // `Reason` <- `\"Error\"`\n * }\n * );\n * ```\n */\n public Then<ResultType = ResolveType, RejectType = never>(OnFulfilled: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public override then<ResultType = ResolveType, RejectType = never>(OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public Catch<ResultType = never>(OnRejected?: TNullable<TOnRejected<ResolveType>>): TPromiseLike<ResolveType | ResultType> {\n return new TPromise<ResolveType | ResultType>(this.Underlying.catch(OnRejected));\n }\n public Finally(OnFinally?: TNullable<TFunction>): TPromise<ResolveType> {\n return new TPromise(this.Underlying.finally(OnFinally));\n }\n public static Resolve<ResolveType>(Value: ResolveType | PromiseLike<ResolveType>): TPromise<Awaited<ResolveType>> {\n return new TPromise(Promise.resolve(Value));\n }\n public static Reject<ResolveType = unknown>(Reason?: unknown): TPromise<ResolveType> {\n return new TPromise(Promise.reject<ResolveType>(Reason));\n }\n public Raw(): Promise<ResolveType> {\n return this.Underlying;\n }\n}\n;\n", "/**\n * @file Complex.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { MathBuiltin } from \"./Complex.Internal\";\nimport { Operator } from \"tsover-runtime\";\n/**\n * Elements of the complex plane, $\\mathbf{C} = \\mathbf{R}[x] / [ x^2 + 1 ]$.\n */\nexport class FComplex {\n public readonly Re: number;\n public readonly Im: number;\n public static Zero: FComplex = new FComplex(0, 0);\n /**\n * The copy constructor for {@link FComplex} numbers.\n *\n * @param Z - The existing {@link FComplex} number to copy.\n *\n * @example\n * ```typescript\n * const Z: FComplex = 3 + 2 * i;\n * const W: FComplex = new FComplex(Z);\n * // `W.Re === Z.Re` <- `true`\n * // `W.Im === Z.Im` <- `true`\n * ```\n */\n public constructor(Z: FComplex);\n /**\n * Construct an {@link FComplex} number by specifying the real\n * and imaginary components.\n *\n * @param A - The real component of the {@link FComplex} number.\n * @param B - The imaginary component of the {@link FComplex} number.\n *\n * @example\n * ```typescript\n * const Theta: number = 0.5;\n * const OnUnitDisk: FComplex = new FComplex(Math.sin(Theta), Math.cos(Theta));\n * ```\n */\n public constructor(A: number, B: number);\n public constructor(A: FComplex | number, B: number = 0) {\n if (typeof A === \"number\") {\n this.Re = A;\n this.Im = B;\n }\n else {\n this.Re = A.Re;\n this.Im = A.Im;\n }\n }\n /**\n * Get the modulus of this {@link FComplex} number.\n *\n * @returns {number} The modulus of this {@link FComplex} number.\n */\n public get Mod(): number {\n return MathBuiltin.sqrt((this.Re ** 2) + (this.Im ** 2));\n }\n /**\n * Get the modulus of this {@link FComplex} number.\n *\n * @returns {number} The modulus of this {@link FComplex} number.\n */\n public get Theta(): number {\n const Out: number = MathBuiltin.atan2(this.Im, this.Re);\n if (Out < 0) {\n return Out + 2 * MathBuiltin.PI;\n }\n return Out;\n }\n [Operator.star](A: FComplex, B: FComplex): FComplex;\n [Operator.star](A: FComplex, B: number): FComplex;\n [Operator.star](A: number, B: FComplex): FComplex;\n [Operator.star](A: FComplex | number, B: number | FComplex): FComplex {\n if (typeof A === \"number\") {\n return new FComplex((B as FComplex).Re * A, (B as FComplex).Im * A);\n }\n else if (typeof B === \"number\") {\n return new FComplex((A as FComplex).Re * B, (A as FComplex).Im * B);\n }\n else {\n return new FComplex((((A as FComplex).Re + (B as FComplex).Re) -\n ((A as FComplex).Im + (B as FComplex).Im)), (((A as FComplex).Re + (B as FComplex).Im) +\n ((B as FComplex).Re + (A as FComplex).Im)));\n }\n }\n [Operator.plus](A: FComplex, B: FComplex): FComplex;\n [Operator.plus](A: FComplex, B: number): FComplex;\n [Operator.plus](A: number, B: FComplex): FComplex;\n [Operator.plus](A: FComplex | number, B: number | FComplex): FComplex {\n if (typeof A === \"number\") {\n return new FComplex(A + (B as FComplex).Re, (B as FComplex).Im);\n }\n else if (typeof B === \"number\") {\n return new FComplex((A as FComplex).Re + B, (A as FComplex).Im);\n }\n else {\n return new FComplex((A as FComplex).Re + (B as FComplex).Re, (A as FComplex).Im + (B as FComplex).Im);\n }\n }\n}\nexport /**\n * The imaginary unit.\n */ const i: FComplex = new FComplex(0, 1);\n", "/**\n * @file Complex.Internal.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport const MathBuiltin: typeof Math = Math;\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./FileSystem.ts\";\nexport * from \"./FileSystem.Types.ts\";\n", "/**\n * @file FileSystem.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { basename, dirname, extname, join } from \"path\";\nimport { type FFileExtension } from \"./FileSystem.Types.ts\";\nimport { type FileHandle } from \"fs/promises\";\nimport { promises as Fs } from \"fs\";\nimport { constants as FsConstants } from \"fs\";\nimport os from \"os\";\nasync function PathExists(Path: string): Promise<boolean> {\n try {\n await Fs.access(Path, FsConstants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * @param Extension - The file extension that you wish to test.\n * @returns Whether the file extension is valid on the current platform.\n */\nexport function IsSupportedFileExtension(Extension: FFileExtension): boolean {\n let NormalizedExtension: string = Extension.slice(1);\n if (NormalizedExtension.startsWith(\".\")) {\n NormalizedExtension = NormalizedExtension.slice(1);\n }\n if (NormalizedExtension.length === 0) {\n return false;\n }\n if (NormalizedExtension.includes(\"/\")\n || NormalizedExtension.includes(\"\\\\\")\n || NormalizedExtension.includes(\"\\0\")) {\n return false;\n }\n if (os.platform() === \"win32\") {\n /* eslint-disable-next-line no-control-regex */\n const HasIllegalCharacters: boolean = /[<>:\"/\\\\|?*\\x00-\\x1F]/u.test(NormalizedExtension);\n if (HasIllegalCharacters) {\n return false;\n }\n if (/[ .]$/u.test(NormalizedExtension)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Given a path at which we wish to create a new file, check if a file at that\n * path already exists, and if so, then append `(${ number })` before the file\n * extension, consistent with the Windows Explorer handles conflicting file\n * names when pasting files.\n */\nexport async function GetSafeNewPath(InPath: string): Promise<string> {\n const DirectoryPath: string = dirname(InPath);\n const Extension: string = extname(InPath);\n const FileName: string = basename(InPath);\n const BaseFileName: string = Extension === \"\"\n ? FileName\n : basename(InPath, Extension);\n let CandidatePath: string = InPath;\n let Index: number = 1;\n while (await PathExists(CandidatePath)) {\n const CandidateFileName: string = `${BaseFileName} (${Index})${Extension}`;\n CandidatePath = join(DirectoryPath, CandidateFileName);\n Index++;\n }\n return CandidatePath;\n}\n/**\n * @param DirectoryPath - The path to the directory in which you wish to check.\n * @param FileName - The desired file name.\n * @param PersistNewFile - *(Optional)* Whether to keep the otherwise-temporary\n * file created at the desired path.\n * @param Extension - *(Optional)* If provided, the function will only return `true`\n * if `FileName.endsWith(Extension)` *and* the `Extension` is a valid\n * file extension.\n * @returns Whether a file of the given `FileName` can be created in `DirectoryPath`.\n *\n * @remarks This *does* attempt to create a file at the desired path. The file is\n * temporary iff `!PersistNewFile`, and is never created when this function\n * returns `false`.\n */\nexport async function IsValidFileName(DirectoryPath: string, FileName: string, PersistNewFile: boolean = false, Extension: FFileExtension | undefined = undefined): Promise<boolean> {\n const ExtensionSafe: FFileExtension | null | \"\" = Extension !== undefined\n ? (Extension.startsWith(\".\") && IsSupportedFileExtension(Extension))\n ? Extension\n : null\n : \"\";\n const IsExtensionImproper: boolean = (ExtensionSafe === null ||\n ExtensionSafe === \".\" ||\n !FileName.endsWith(ExtensionSafe));\n if (IsExtensionImproper) {\n return false;\n }\n const FilePath: string = join(DirectoryPath, FileName);\n try {\n const ThisFileHandle: FileHandle = await Fs.open(FilePath, \"wx\");\n await ThisFileHandle.close();\n if (!PersistNewFile) {\n await Fs.unlink(FilePath);\n }\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * Write a text file to a given {@link Path} having contents {@link Contents}.\n *\n * @param Path - The path of the file that will be written.\n * @param Contents - The text contents of the file to write.\n *\n * @returns {Promise<void>} A {@link Promise} that resolves when the call to {@link Fs.writeFile} resolves.\n *\n * @example\n * ```typescript\n * import { WriteTextFile } from \"@sorrell/utilities/fs\";\n * import { resolve } from \"path\";\n *\n * const MyReadMe: string = \"# ReadMe\\n\\nThis package accomplishes...\\n\";\n * const MyReadMePath: string = resolve(\".\");\n *\n * await WriteTextFile(MyReadMePath, MyReadMe);\n * ```\n */\nexport async function WriteTextFile(Path: string, Contents: string): Promise<void> {\n await Fs.writeFile(Path, Contents, { encoding: \"utf-8\" });\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Functional.ts\";\nexport * from \"./Functional.Types.ts\";\n", "/**\n * @file Functional.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { CurriedArgument } from \"./Functional.Internal\";\nimport type { FCurriedArgument } from \"./Functional.Internal.Types\";\nimport type { TFunction } from \"./Functional.Types\";\nexport function Identity<Type>(...Arguments: Array<Type>) {\n return Arguments;\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module Math\n * Functions, types, and classes for mathematical computations.\n */\nexport * as Complex from \"./Index.Complex.ts\";\nexport * as Vector from \"./Vector.ts\";\nexport * from \"./Math.ts\";\nexport * from \"./Math.Types.ts\";\n", "/**\n * @file Index.Complex.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Complex.ts\";\nexport * from \"./Complex.Types.ts\";\n", "/**\n * @file Vector.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { Operator } from \"tsover-runtime\";\n/** A representation of elements in $\\mathbf{R}^2$. */\nexport class FVector2D {\n /** The $x$-component of this vector. */\n public readonly X: number;\n /** The $y$-component of this vector. */\n public readonly Y: number;\n /** The identity of $\\mathbf{R}^2$ *wrt* addition. */\n public static Zero: FVector2D = new FVector2D(0, 0);\n /**\n * Construct a vector by specifying both components.\n *\n * @param Value - The value of both the {@link FVector2D!X | x}- and\n * {@link FVector2D!Y ? y}-components.\n */\n public constructor(Value: number);\n /**\n * Construct a vector by specifying both components.\n *\n * @param X - The value of the {@link FVector2D!X} component.\n * @param Y - The value of the {@link FVector2D!Y} component.\n */\n public constructor(X: number, Y: number);\n public constructor(X: number = 0, Y: number = X) {\n this.X = X;\n this.Y = Y;\n }\n /**\n * Get a representation of this vector as a `string`.\n *\n * @returns {string} The string representation of this vector.\n */\n public toString(): string {\n return `(${this.X}, ${this.Y})`;\n }\n /**\n * Perform per-component addition of two {@link FVector2D}s.\n *\n * @param Left - The left-hand operand.\n * @param Right - The right-hand operand.\n *\n * @returns {FVector2D} The per-component sum of {@link Left} and {@link Right}.\n *\n * @example\n * ```typescript\n * \"use tsover\";\n *\n * const A: FVector2D = new FVector2D(1, -1);\n * const B: FVector2D = new FVector2D(-3, 5);\n *\n * const C: FVector2D = A + B;\n * // `C` <- `(-2, 4)`\n * ```\n */\n [Operator.plus](Left: FVector2D, Right: FVector2D): FVector2D {\n return new FVector2D(Left.X + Right.X, Left.Y + Right.Y);\n }\n [Operator.minus](A: FVector2D, B: FVector2D): FVector2D {\n return new FVector2D(A.X - B.X, A.Y - B.Y);\n }\n [Operator.preMinus](Vector: FVector2D): FVector2D {\n return new FVector2D(-1 * Vector.X, -1 * Vector.Y);\n }\n /**\n * Perform scalar multiplication of an {@link FVector2D} and a `number` value.\n * Exactly one of the two arguments must be a `number`, and the other an\n * {@link FVector2D}.\n *\n * @param Left - The left-hand operand (either a `number` or an {@link FVector2D}).\n * @param Left - The right-hand operand (either a `number` or an {@link FVector2D}).\n *\n * @returns {FVector2D} The per-component sum of {@link Left} and {@link Right}.\n */\n [Operator.star](Left: number, Right: FVector2D): FVector2D;\n [Operator.star](Left: FVector2D, Right: number): FVector2D;\n [Operator.star](Left: FVector2D | number, Right: FVector2D | number): FVector2D | typeof Operator.deferOperation {\n if (typeof Left === \"number\" && Right instanceof FVector2D) {\n return new FVector2D(Left * Right.X, Left * Right.Y);\n }\n if (typeof Right === \"number\" && Left instanceof FVector2D) {\n return new FVector2D(Left.X * Right, Left.Y * Right);\n }\n return Operator.deferOperation;\n }\n public get length(): number {\n return Math.sqrt((this.X ** 2) + (this.Y ** 2));\n }\n public get Length(): number {\n return this.length;\n }\n}\n/** A representation of elements in $\\mathbf{R}^3$. */\nexport class FVector {\n public readonly X: number;\n public readonly Y: number;\n public readonly Z: number;\n /** Constructs the zero {@link FVector}. */\n public constructor();\n /**\n * Constructs an {@link FVector} with all components set to {@link Value}.\n *\n * @param Value - The value of all components of the new {@link FVector}.\n */\n public constructor(Value: number);\n /**\n * Constructs an {@link FVector} with all components set to {@link Value}.\n *\n * @param X - The value of the {@link FVector!X} component.\n * @param Y - The value of the {@link FVector!Y} component.\n * @param Z - The value of the {@link FVector!Z} component.\n */\n public constructor(X: number, Y: number, Z: number);\n public constructor(X: number = 0, Y: number = X, Z: number = X) {\n this.X = X;\n this.Y = Y;\n this.Z = Z;\n }\n [Operator.plus](Left: FVector, Right: FVector): FVector {\n return new FVector(Left.X + Right.X, Left.Y + Right.Y, Left.Z + Right.Z);\n }\n [Operator.minus](A: FVector, B: FVector): FVector {\n return new FVector(A.X - B.X, A.Y - B.Y, A.Z - B.Z);\n }\n [Operator.preMinus](Vector: FVector): FVector {\n return new FVector(-1 * Vector.X, -1 * Vector.Y, -1 * Vector.Z);\n }\n [Operator.star](Left: number, Right: FVector): FVector;\n [Operator.star](Left: FVector, Right: number): FVector;\n [Operator.star](Left: FVector | number, Right: FVector | number): FVector | typeof Operator.deferOperation {\n if (typeof Left === \"number\" && Right instanceof FVector) {\n return new FVector(Left * Right.X, Left * Right.Y, Left * Right.Z);\n }\n if (typeof Right === \"number\" && Left instanceof FVector) {\n return new FVector(Left.X * Right, Left.Y * Right, Left.Z * Right);\n }\n return Operator.deferOperation;\n }\n public get length(): number {\n return Math.sqrt((this.X ** 2) + (this.Y ** 2) + (this.Z ** 2));\n }\n public get Length(): number {\n return this.length;\n }\n}\n", "/**\n * @file Math.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/* eslint-disable */\nexport const __DummyExport_Number: \"DummyExport\" = \"DummyExport\" as const;\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Utility.Types.ts\";\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module Npm\n * Utilities for working with `npm` (NodeJS) packages.\n * Many of these likely work with packages of other NodeJS\n * package managers and adjacent runtimes (*e.g.*, `bun` or `deno`).\n */\nexport * from \"./Npm.ts\";\nexport * from \"./Npm.Error.ts\";\n", "/**\n * @file Npm.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { promises as Fs, constants as FsConstants } from \"fs\";\nimport { PackageJsonParseError, RootDirectoryNotFoundError } from \"./Npm.Error.ts\";\nimport { dirname, join } from \"path\";\nimport type { IPackageJson } from \"package-json-type\";\nimport Process from \"process\";\n/**\n * Get the `package.json` of the Node.js project in which the\n * given path, or the current working directory, resides.\n *\n * @param Path - The given path from which to look for a root directory.\n *\n * @throws {RootDirectoryNotFoundError | PackageJsonParseError} An error\n * describing either failure to identify a root directory, or failing to\n * parse the discovered `package.json`.\n *\n * @returns {Promise<IPackageJson>} The {@link IPackageJson} of {@link Path}\n * if provided, otherwise of `process.cwd()`.\n *\n * @example\n * Suppose `process.cwd() === \"./MyPackage\"`,\n * ```typescript\n * const PackageJson: IPackageJson = await GetPackageJson();\n * // `PackageJson` <- *The parsed `package.json` of `MyPackage`.*\n * ```\n */\nexport async function GetPackageJson(Path?: string): Promise<IPackageJson> {\n const RootDirectory: string = await GetPackageRootDirectory(Path);\n const PackageJsonPath: string = join(RootDirectory, \"package.json\");\n const FileContents: string = await Fs.readFile(PackageJsonPath, \"utf-8\");\n const PackageJson: IPackageJson = await (async (): Promise<IPackageJson> => {\n try {\n return JSON.parse(FileContents) as IPackageJson;\n }\n catch (Cause: unknown) {\n throw new PackageJsonParseError({ Cause, Path: PackageJsonPath });\n }\n })();\n return PackageJson;\n}\n/**\n * Get the root directory of the Node.js project in which the\n * current working directory resides.\n *\n * @param Path - The given path from which to look for a root directory.\n *\n * @throws {RootDirectoryNotFoundError} An error iff the root directory\n * of a NodeJS package could not be found.\n *\n * @returns {Promise<string>} The path to the root directory of the package\n * containing {@link Path} if specified, otherwise containing `process.cwd()`.\n *\n * @example\n * Suppose `process.cwd()` is any one of the following,\n * - `/home/alex/myPackage`,\n * - `/home/alex/myPackage/src/MyModule`,\n * - `/home/alex/myPackage/resource/Images`,\n *\n * then,\n *\n * ```typescript\n * const Root: string = await GetPackageRootDirectory();\n * // `Root` <- `\"/home/alex/myPackage\"`\n * ```\n *\n * @example\n * Suppose `TestPath === \"/home/alex/Documents\"` is *not* a NodeJS package root\n * (of course, neither are `/home/alex` or `/home`). Then,\n *\n * ```typescript\n * const TestPath: string = \"/home/alex/Documents\";\n * let Root: string | undefined = undefined;\n * try\n * {\n * Root = await GetPackageRootDirectory(TestPath);\n * }\n * catch (Error: unknown)\n * {\n * // `Error instanceof RootDirectoryNotFound`\n * }\n *\n * // `Root` <- `undefined`\n * ```\n *\n * @example\n * Suppose `process.cwd() === /home/alex/Downloads`, which is *not* a NodeJS package\n * (of course, neither are `/home/alex` or `/home`). Then,\n *\n * ```typescript\n * let Root: string | undefined = undefined;\n * try\n * {\n * Root = await GetPackageRootDirectory();\n * }\n * catch (Error: unknown)\n * {\n * // `Error instanceof RootDirectoryNotFound`\n * }\n * // `Root` <- `undefined`\n * ```\n */\nexport async function GetPackageRootDirectory(Path?: string): Promise<string> {\n let CurrentDirectory: string = await Fs.realpath(Path ?? Process.cwd());\n while (true) {\n const PackageJsonPath: string = join(CurrentDirectory, \"package.json\");\n const PackageJsonExists: boolean = await (async (): Promise<boolean> => {\n try {\n await Fs.access(PackageJsonPath, FsConstants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n })();\n if (PackageJsonExists) {\n return CurrentDirectory;\n }\n const ParentDirectory: string = dirname(CurrentDirectory);\n if (ParentDirectory === CurrentDirectory) {\n throw new RootDirectoryNotFoundError({ Path });\n }\n CurrentDirectory = ParentDirectory;\n }\n}\n", "/**\n * @file Npm.Error.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { Data } from \"effect\";\n/**\n * An error describing that {@link GetPackageJson} failed to parse the discovered `package.json` file.\n *\n * @property {string | undefined} Path - The `Path` argument passed to the effect returning this error,\n * if one was given.\n * @property {unknown} Cause - The cause of this error.\n */\nexport class PackageJsonParseError extends Data.TaggedError(\"PackageJsonParseError\")<{\n readonly Path: string | undefined;\n readonly Cause: unknown;\n}> {\n}\n/**\n * An error describing that {@link GetPackageRootDirectory} failed.\n *\n * @property {string | undefined} Path - The `Path` argument passed to the effect returning\n * this error, if one was given.\n */\nexport class RootDirectoryNotFoundError extends Data.TaggedError(\"RootDirectoryNotFound\")<{\n readonly Path: string | undefined;\n}> {\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Path.ts\";\n", "/**\n * @file Path.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { join } from \"path\";\nimport { Operator } from \"tsover-runtime\";\nexport class FPath {\n public readonly Raw: string;\n public toString(): string {\n return this.Raw;\n }\n public constructor(String: string);\n public constructor(Other: FPath);\n public constructor(Argument: string | FPath) {\n if (typeof Argument === \"string\") {\n this.Raw = Argument;\n }\n else {\n this.Raw = Argument.Raw;\n }\n }\n [Operator.slash](A: FPath, B: FPath): FPath;\n [Operator.slash](A: string, B: FPath): FPath;\n [Operator.slash](A: FPath, B: string): FPath;\n [Operator.slash](A: FPath | string, B: FPath | string): FPath {\n if (typeof A === \"string\") {\n return new FPath(join(A, (B as FPath).Raw));\n }\n else if (typeof B === \"string\") {\n return new FPath(join((A as FPath).Raw, B));\n }\n else {\n return new FPath(join((A as FPath).Raw, (B as FPath).Raw));\n }\n }\n}\n", "/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./String.ts\";\n", "/**\n * @file String.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\n/**\n * @module String\n * Functions for manipulating strings.\n */\n/**\n * @param In - The string that you wish to test.\n * @returns Whether the given string contains *only* (Latin alphabet) letters.\n */\nexport function IsLetters(In: string): boolean {\n return /^[a-zA-Z]*$/.test(In);\n}\n/**\n * @remarks *(This is an alias for `IsOnlyLetters`).*\n *\n * @param In - The string that you wish to test.\n * @returns Whether the given string contains *only* (Latin alphabet) letters.\n */\nexport function IsAlpha(In: string): boolean {\n return IsLetters(In);\n}\n/**\n * @param In - The string that you wish to test.\n * @returns Whether the given string contains *only* numeric digits.\n */\nexport function IsNumeric(In: string): boolean {\n return /^\\d+$/.test(In);\n}\n"],
5
+ "mappings": ";;;;;;;AAAA;AAAA;AAAA;AAAA;;;ACgCO,SAAS,cAAuG,OAAuH;AAC1O,SAAO,MAAM,OAAO,CAAC,YAA8C;AAC/D,WAAO,YAAY;AAAA,EACvB,CAAC;AACL;;;ACpCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACqEO,IAAM,0BAAN,cAAsC,MAAM;AAAA,EACxC,YAAY,WAAoB;AACnC,UAAM,SAAS;AAAA,EACnB;AACJ;;;AC/BA,eAAsB,IAAc,QAA6D;AAC7F,MAAI;AACA,UAAMA,QAAiB,OAAO,WAAW,aACnC,MAAM,OAAO,IACb,MAAM;AACZ,WAAO;AAAA,MACH,MAAAA;AAAA,MACA,OAAO;AAAA,IACX;AAAA,EACJ,SACO,YAAqB;AACxB,WAAO;AAAA,MACH,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,EACJ;AACJ;AAqBA,eAAsB,IAA4C,UAAsC,QAA2G;AAC/M,QAAM,gBAAgB,OAAO,YAA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,KAAK,CAAC;AAAA,IACjD;AACA,uBAAmB;AAAA,EACvB;AACJ;;;AEhIA;AAAA;AAAA;AAAA;;;ACMA,SAAS,QAAAI,aAAY;AACrB,SAAS,YAAAC,iBAAgB;AAClB,IAAM,QAAN,MAAM,OAAM;AAAA,EAER,WAAmB;AACtB,WAAO,KAAK;AAAA,EAChB;AAAA,EAGO,YAAY,UAA0B;AACzC,QAAI,OAAO,aAAa,UAAU;AAC9B,WAAK,MAAM;AAAA,IACf,OACK;AACD,WAAK,MAAM,SAAS;AAAA,IACxB;AAAA,EACJ;AAAA,EAIA,CAACA,UAAS,KAAK,EAAE,GAAmB,GAA0B;AAC1D,QAAI,OAAO,MAAM,UAAU;AACvB,aAAO,IAAI,OAAMD,MAAK,GAAI,EAAY,GAAG,CAAC;AAAA,IAC9C,WACS,OAAO,MAAM,UAAU;AAC5B,aAAO,IAAI,OAAMA,MAAM,EAAY,KAAK,CAAC,CAAC;AAAA,IAC9C,OACK;AACD,aAAO,IAAI,OAAMA,MAAM,EAAY,KAAM,EAAY,GAAG,CAAC;AAAA,IAC7D;AAAA,EACJ;AACJ;;;ACrCA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,SAAS,UAAU,IAAqB;AAC3C,SAAO,cAAc,KAAK,EAAE;AAChC;AAOO,SAAS,QAAQ,IAAqB;AACzC,SAAO,UAAU,EAAE;AACvB;AAKO,SAAS,UAAU,IAAqB;AAC3C,SAAO,QAAQ,KAAK,EAAE;AAC1B;",
6
6
  "names": ["Data", "Operator", "Fs", "FsConstants", "dirname", "join", "Fs", "FsConstants", "join", "Operator"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../Source/Miscellaneous/index.ts", "../Source/Miscellaneous/Utility.Types.ts"],
4
- "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Utility.Types.ts\";\n", "/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type * as TypeScript from \"typescript\";\nimport type { NoOptions } from \"./Utility.Internal.ts\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The union of a given {@link ElementType} and the array of a given {@link ElementType}.\n *\n * @template ElementType - The type of this, or the type of elements contained by this.\n */\nexport type TMaybeArray<ElementType> = ElementType | Array<ElementType>;\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\nexport type FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC0EO,IAAM,0BAAN,cAAsC,MAAM;AAAA,EACxC,YAAY,WAAoB;AACnC,UAAM,SAAS;AAAA,EACnB;AACJ;",
4
+ "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Utility.Types.ts\";\n", "/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type { NoOptions } from \"./Utility.Internal.ts\";\nimport type TypeScript from \"typescript\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\n/** An error that is thrown in default implementations of `abstract` `class`es. */\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\ntype FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n/**\n * Maps a given {@link RecordLike} type to an identical {@link Record} type, but\n * the properties are wrapped with {@link NonNullable}.\n *\n * @template RecordLike - The `Record`-like type from which this type is defined.\n */\nexport type TRecordNonNullable<RecordLike> = {\n [Key in keyof RecordLike]: NonNullable<RecordLike[Key]>;\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACqEO,IAAM,0BAAN,cAAsC,MAAM;AAAA,EACxC,YAAY,WAAoB;AACnC,UAAM,SAAS;AAAA,EACnB;AACJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../Source/Miscellaneous/Utility.Types.ts"],
4
- "sourcesContent": ["/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type * as TypeScript from \"typescript\";\nimport type { NoOptions } from \"./Utility.Internal.ts\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The union of a given {@link ElementType} and the array of a given {@link ElementType}.\n *\n * @template ElementType - The type of this, or the type of elements contained by this.\n */\nexport type TMaybeArray<ElementType> = ElementType | Array<ElementType>;\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\nexport type FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n"],
5
- "mappings": ";AA0EO,IAAM,0BAAN,cAAsC,MAAM;AAAA,EACxC,YAAY,WAAoB;AACnC,UAAM,SAAS;AAAA,EACnB;AACJ;",
4
+ "sourcesContent": ["/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type { NoOptions } from \"./Utility.Internal.ts\";\nimport type TypeScript from \"typescript\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\n/** An error that is thrown in default implementations of `abstract` `class`es. */\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\ntype FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n/**\n * Maps a given {@link RecordLike} type to an identical {@link Record} type, but\n * the properties are wrapped with {@link NonNullable}.\n *\n * @template RecordLike - The `Record`-like type from which this type is defined.\n */\nexport type TRecordNonNullable<RecordLike> = {\n [Key in keyof RecordLike]: NonNullable<RecordLike[Key]>;\n};\n"],
5
+ "mappings": ";AAqEO,IAAM,0BAAN,cAAsC,MAAM;AAAA,EACxC,YAAY,WAAoB;AACnC,UAAM,SAAS;AAAA,EACnB;AACJ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sorrell/utilities",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "private": false,
5
5
  "description": "Various TypeScript utilities.",
6
6
  "keywords": [
@@ -9,11 +9,12 @@
9
9
  "typescript",
10
10
  "ts"
11
11
  ],
12
- "homepage": "https://github.com/GageSorrell/SorrellWm/tree/Master/Package/Utilities",
12
+ "homepage": "https://github.com/GageSorrell/SorrellWm/tree/Master/Package/Utilities#ReadMe",
13
13
  "bugs": {
14
14
  "url": "https://github.com/GageSorrell/SorrellWm/issues"
15
15
  },
16
16
  "repository": {
17
+ "directory": "Package/Utilities",
17
18
  "type": "git",
18
19
  "url": "git+https://github.com/GageSorrell/SorrellWm.git"
19
20
  },
@@ -164,14 +165,14 @@
164
165
  },
165
166
  "types": "./Distribution/Types/index.d.ts",
166
167
  "scripts": {
167
- "prepublish": "npm run build",
168
+ "prepack": "npm run build",
168
169
  "build:js": "node esbuild.config.mts",
169
170
  "prebuild:types": "tsc -p ./tsconfig.script.json",
170
171
  "build:types": "tsc -p ./tsconfig.types.json && node ./Intermediate/Script/CreateTypeDeclarations.js",
171
172
  "build": "npm run build:js && npm run build:types"
172
173
  },
173
174
  "devDependencies": {
174
- "@types/node": "^25.6.0",
175
+ "@types/node": "^24.12.2",
175
176
  "clipboardy": "^5.3.1",
176
177
  "esbuild": "^0.28.0",
177
178
  "package-json-type": "^1.1.2",