@zayne-labs/toolkit-type-helpers 0.9.40 → 0.9.44

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.
@@ -31,6 +31,7 @@ type AnyString = string & Record<never, never>;
31
31
  type AnyNumber = number & Record<never, never>;
32
32
  type LiteralUnion<TUnion extends TBase, TBase = string> = TUnion | (TBase & Record<never, never>);
33
33
 
34
+ type ArrayOrObject = Record<number | string | symbol, unknown> | unknown[];
34
35
  type WriteableVariantUnion = "deep" | "shallow";
35
36
  /**
36
37
  * Makes all properties in an object type writeable (removes readonly modifiers).
@@ -38,13 +39,12 @@ type WriteableVariantUnion = "deep" | "shallow";
38
39
  * @template TObject - The object type to make writeable
39
40
  * @template TVariant - The level of writeable transformation ("shallow" | "deep")
40
41
  */
41
- type ArrayOrObject = Record<number | string | symbol, unknown> | unknown[];
42
- type Writeable<TObject, TVariant extends WriteableVariantUnion = "shallow"> = TObject extends readonly [...infer TTupleItems] ? TVariant extends "deep" ? [
42
+ type Writeable<TObject, TVariant extends WriteableVariantUnion = "shallow"> = TObject extends readonly [...infer TTupleItems] ? [
43
43
  ...{
44
- [Key in keyof TTupleItems]: TTupleItems[Key] extends ArrayOrObject ? Writeable<TTupleItems[Key], TVariant> : TTupleItems[Key];
44
+ [Index in keyof TTupleItems]: TVariant extends "deep" ? Writeable<TTupleItems[Index], "deep"> : TTupleItems[Index];
45
45
  }
46
- ] : [...TTupleItems] : TObject extends ReadonlyArray<infer TArrayItem> ? TVariant extends "deep" ? Array<TArrayItem extends ArrayOrObject ? Writeable<TArrayItem, TVariant> : TArrayItem> : TArrayItem[] : TObject extends ArrayOrObject ? {
47
- -readonly [Key in keyof TObject]: TVariant extends "shallow" ? TObject[Key] : TVariant extends "deep" ? TObject[Key] extends ArrayOrObject ? Writeable<TObject[Key], TVariant> : TObject[Key] : never;
46
+ ] : TObject extends ArrayOrObject ? {
47
+ -readonly [Key in keyof TObject]: TVariant extends "deep" ? Writeable<TObject[Key], "deep"> : TObject[Key];
48
48
  } : TObject;
49
49
 
50
50
  type ErrorMessages<TType extends number | string | symbol = never> = Partial<Record<"$all" | number | symbol | (AnyString | TType), unknown>> | null;
@@ -112,7 +112,7 @@ type AssertFn = {
112
112
  };
113
113
  declare const assert: AssertFn;
114
114
 
115
- declare const defineEnum: <const TValue, TVariant extends WriteableVariantUnion = "shallow">(value: TValue) => Prettify<Writeable<TValue, TVariant>>;
116
- declare const defineEnumDeep: <const TValue, TVariant extends WriteableVariantUnion = "deep">(value: TValue) => Prettify<Writeable<TValue, TVariant>>;
115
+ declare const defineEnum: <const TValue>(value: TValue) => Prettify<Writeable<TValue>>;
116
+ declare const defineEnumDeep: <const TValue>(value: TValue) => Prettify<Writeable<TValue, "deep">>;
117
117
 
118
118
  export { type AnyAsyncFunction, type AnyFunction, type AnyNumber, type AnyObject, type AnyString, AssertionError, type Awaitable, type CallbackFn, type EmptyObject, type ExtractUnion, type LiteralUnion, type NonEmptyArray, type NonFalsy, type Prettify, type PrettyOmit, type PrettyPick, type SelectorFn, type UnionDiscriminator, type UnionToIntersection, type UnknownObject, type UnknownObjectWithAnyKey, type UnmaskType, type Writeable, type WriteableVariantUnion, assert, assertDefined, assertENV, defineEnum, defineEnumDeep, hasObjectPrototype, isArray, isAsyncFunction, isBoolean, isFile, isFormData, isFunction, isIterable, isNumber, isObject, isObjectAndNotArray, isPlainObject, isString, isSymbol };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/guard.ts","../../src/assert.ts","../../src/common.ts"],"names":[],"mappings":";AAOO,IAAM,QAAW,GAAA,CAAC,KAAmB,KAAA,OAAO,KAAU,KAAA;AAEtD,IAAM,QAAW,GAAA,CAAC,KAAmB,KAAA,OAAO,KAAU,KAAA;AAEtD,IAAM,QAAW,GAAA,CAAC,KAAmB,KAAA,OAAO,KAAU,KAAA;AAEtD,IAAM,SAAY,GAAA,CAAC,KAAmB,KAAA,OAAO,KAAU,KAAA;AAEvD,IAAM,OAAU,G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AAA,KAAA;AACR","file":"index.js","sourcesContent":["import type {\n\tAnyAsyncFunction,\n\tAnyFunction,\n\tUnknownObject,\n\tUnknownObjectWithAnyKey,\n} from \"./type-utils/common\";\n\nexport const isString = (value: unknown) => typeof value === \"string\";\n\nexport const isNumber = (value: unknown) => typeof value === \"number\";\n\nexport const isSymbol = (value: unknown) => typeof value === \"symbol\";\n\nexport const isBoolean = (value: unknown) => typeof value === \"boolean\";\n\nexport const isArray = <TArray>(value: unknown): value is TArray[] => Array.isArray(value);\n\nexport const isFormData = (value: unknown) => value instanceof FormData;\n\nexport const isObject = (value: unknown) => typeof value === \"object\" && value !== null;\n\nexport const isObjectAndNotArray = <TObject = UnknownObject>(value: unknown): value is TObject => {\n\treturn isObject(value) && !isArray(value);\n};\n\nexport const hasObjectPrototype = (value: unknown) => {\n\treturn Object.prototype.toString.call(value) === \"[object Object]\";\n};\n\n/**\n * @description Copied from TanStack Query's isPlainObject\n * @see https://github.com/TanStack/query/blob/main/packages/query-core/src/utils.ts#L321\n */\nexport const isPlainObject = <TPlainObject extends UnknownObjectWithAnyKey = UnknownObject>(\n\tvalue: unknown\n): value is TPlainObject => {\n\tif (!hasObjectPrototype(value)) {\n\t\treturn false;\n\t}\n\n\t// If has no constructor\n\tconst constructor = (value as object | undefined)?.constructor;\n\tif (constructor === undefined) {\n\t\treturn true;\n\t}\n\n\t// If has modified prototype\n\tconst prototype = constructor.prototype as object;\n\tif (!hasObjectPrototype(prototype)) {\n\t\treturn false;\n\t}\n\n\t// If constructor does not have an Object-specific method\n\tif (!Object.hasOwn(prototype, \"isPrototypeOf\")) {\n\t\treturn false;\n\t}\n\n\t// Handles Objects created by Object.create(<arbitrary prototype>)\n\tif (Object.getPrototypeOf(value) !== Object.prototype) {\n\t\treturn false;\n\t}\n\n\t// It's probably a plain object at this point\n\treturn true;\n};\n\nexport const isFunction = <TFunction extends AnyFunction>(value: unknown): value is TFunction => {\n\treturn typeof value === \"function\";\n};\n\nexport const isAsyncFunction = <TAsyncFunction extends AnyAsyncFunction>(\n\tvalue: unknown\n): value is TAsyncFunction => {\n\treturn isFunction(value) && value.constructor.name === \"AsyncFunction\";\n};\n\nexport const isFile = (value: unknown): value is File => value instanceof File;\n\nexport const isIterable = <TIterable>(obj: object): obj is Iterable<TIterable> => Symbol.iterator in obj;\n","import { isString } from \"./guard\";\n\nexport class AssertionError extends Error {\n\toverride name = \"AssertionError\";\n\n\tconstructor(message?: string) {\n\t\tconst prefix = \"Assertion failed\";\n\n\t\tsuper(message ? `${prefix}: ${message}` : message);\n\t}\n}\n\nexport const assertDefined = <TValue>(value: TValue) => {\n\tif (value == null) {\n\t\tthrow new AssertionError(`The value passed is \"${value as null | undefined}!\"`);\n\t}\n\n\treturn value;\n};\n\nexport const assertENV = (variable: string | undefined, message?: string) => {\n\tif (variable === undefined) {\n\t\tthrow new AssertionError(message);\n\t}\n\n\treturn variable;\n};\n\ntype AssertOptions = {\n\tmessage: string;\n};\n\ntype AssertFn = {\n\t(condition: boolean, messageOrOptions?: string | AssertOptions): asserts condition;\n\n\t<TValue>(\n\t\tvalue: TValue,\n\t\tmessageOrOptions?: string | AssertOptions\n\t): asserts value is NonNullable<TValue>;\n};\n\nexport const assert: AssertFn = (input: unknown, messageOrOptions?: string | AssertOptions) => {\n\tif (input === false || input == null) {\n\t\tconst message = isString(messageOrOptions) ? messageOrOptions : messageOrOptions?.message;\n\n\t\tthrow new AssertionError(message);\n\t}\n};\n","import type { Prettify, Writeable, WriteableVariantUnion } from \"./type-utils\";\n\nexport const defineEnum = <const TValue, TVariant extends WriteableVariantUnion = \"shallow\">(\n\tvalue: TValue\n) => {\n\treturn value as Prettify<Writeable<TValue, TVariant>>;\n};\n\nexport const defineEnumDeep = <const TValue, TVariant extends WriteableVariantUnion = \"deep\">(\n\tvalue: TValue\n) => {\n\treturn value as Prettify<Writeable<TValue, TVariant>>;\n};\n"]}
1
+ {"version":3,"sources":["../../src/guard.ts","../../src/assert.ts","../../src/common.ts"],"names":[],"mappings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,IAAA,MAAM,OAAU,GAAA,QAAA,CAAS,gBAAgB,CAAA,GAAI,mBAAmB,gBAAkB,EAAA,OAAA;AAElF,IAAM,MAAA,IAAI,eAAe,OAAO,CAAA;AAAA;AAElC;;;AC7Ca,IAAA,UAAA,GAAa,CAAe,KAAkB,KAAA;AAC1D,EAAO,OAAA,KAAA;AACR;AAEa,IAAA,cAAA,GAAiB,CAAe,KAAkB,KAAA;AAC9D,EAAO,OAAA,KAAA;AACR","file":"index.js","sourcesContent":["import type {\n\tAnyAsyncFunction,\n\tAnyFunction,\n\tUnknownObject,\n\tUnknownObjectWithAnyKey,\n} from \"./type-utils/common\";\n\nexport const isString = (value: unknown) => typeof value === \"string\";\n\nexport const isNumber = (value: unknown) => typeof value === \"number\";\n\nexport const isSymbol = (value: unknown) => typeof value === \"symbol\";\n\nexport const isBoolean = (value: unknown) => typeof value === \"boolean\";\n\nexport const isArray = <TArray>(value: unknown): value is TArray[] => Array.isArray(value);\n\nexport const isFormData = (value: unknown) => value instanceof FormData;\n\nexport const isObject = (value: unknown) => typeof value === \"object\" && value !== null;\n\nexport const isObjectAndNotArray = <TObject = UnknownObject>(value: unknown): value is TObject => {\n\treturn isObject(value) && !isArray(value);\n};\n\nexport const hasObjectPrototype = (value: unknown) => {\n\treturn Object.prototype.toString.call(value) === \"[object Object]\";\n};\n\n/**\n * @description Copied from TanStack Query's isPlainObject\n * @see https://github.com/TanStack/query/blob/main/packages/query-core/src/utils.ts#L321\n */\nexport const isPlainObject = <TPlainObject extends UnknownObjectWithAnyKey = UnknownObject>(\n\tvalue: unknown\n): value is TPlainObject => {\n\tif (!hasObjectPrototype(value)) {\n\t\treturn false;\n\t}\n\n\t// If has no constructor\n\tconst constructor = (value as object | undefined)?.constructor;\n\tif (constructor === undefined) {\n\t\treturn true;\n\t}\n\n\t// If has modified prototype\n\tconst prototype = constructor.prototype as object;\n\tif (!hasObjectPrototype(prototype)) {\n\t\treturn false;\n\t}\n\n\t// If constructor does not have an Object-specific method\n\tif (!Object.hasOwn(prototype, \"isPrototypeOf\")) {\n\t\treturn false;\n\t}\n\n\t// Handles Objects created by Object.create(<arbitrary prototype>)\n\tif (Object.getPrototypeOf(value) !== Object.prototype) {\n\t\treturn false;\n\t}\n\n\t// It's probably a plain object at this point\n\treturn true;\n};\n\nexport const isFunction = <TFunction extends AnyFunction>(value: unknown): value is TFunction => {\n\treturn typeof value === \"function\";\n};\n\nexport const isAsyncFunction = <TAsyncFunction extends AnyAsyncFunction>(\n\tvalue: unknown\n): value is TAsyncFunction => {\n\treturn isFunction(value) && value.constructor.name === \"AsyncFunction\";\n};\n\nexport const isFile = (value: unknown): value is File => value instanceof File;\n\nexport const isIterable = <TIterable>(obj: object): obj is Iterable<TIterable> => Symbol.iterator in obj;\n","import { isString } from \"./guard\";\n\nexport class AssertionError extends Error {\n\toverride name = \"AssertionError\";\n\n\tconstructor(message?: string) {\n\t\tconst prefix = \"Assertion failed\";\n\n\t\tsuper(message ? `${prefix}: ${message}` : message);\n\t}\n}\n\nexport const assertDefined = <TValue>(value: TValue) => {\n\tif (value == null) {\n\t\tthrow new AssertionError(`The value passed is \"${value as null | undefined}!\"`);\n\t}\n\n\treturn value;\n};\n\nexport const assertENV = (variable: string | undefined, message?: string) => {\n\tif (variable === undefined) {\n\t\tthrow new AssertionError(message);\n\t}\n\n\treturn variable;\n};\n\ntype AssertOptions = {\n\tmessage: string;\n};\n\ntype AssertFn = {\n\t(condition: boolean, messageOrOptions?: string | AssertOptions): asserts condition;\n\n\t<TValue>(\n\t\tvalue: TValue,\n\t\tmessageOrOptions?: string | AssertOptions\n\t): asserts value is NonNullable<TValue>;\n};\n\nexport const assert: AssertFn = (input: unknown, messageOrOptions?: string | AssertOptions) => {\n\tif (input === false || input == null) {\n\t\tconst message = isString(messageOrOptions) ? messageOrOptions : messageOrOptions?.message;\n\n\t\tthrow new AssertionError(message);\n\t}\n};\n","import type { Prettify, Writeable } from \"./type-utils\";\n\nexport const defineEnum = <const TValue>(value: TValue) => {\n\treturn value as Prettify<Writeable<TValue>>;\n};\n\nexport const defineEnumDeep = <const TValue>(value: TValue) => {\n\treturn value as Prettify<Writeable<TValue, \"deep\">>;\n};\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zayne-labs/toolkit-type-helpers",
3
3
  "type": "module",
4
- "version": "0.9.40",
4
+ "version": "0.9.44",
5
5
  "description": "A collection of utility functions, types and composables used by my other projects. Nothing too fancy but can be useful.",
6
6
  "author": "Ryan Zayne",
7
7
  "license": "MIT",
@@ -30,22 +30,21 @@
30
30
  "node": ">=18.x"
31
31
  },
32
32
  "devDependencies": {
33
- "@arethetypeswrong/cli": "^0.17.4",
34
- "@changesets/cli": "^2.29.2",
33
+ "@arethetypeswrong/cli": "^0.18.1",
34
+ "@changesets/cli": "^2.29.4",
35
35
  "@size-limit/esbuild-why": "^11.2.0",
36
36
  "@size-limit/preset-small-lib": "^11.2.0",
37
37
  "@total-typescript/ts-reset": "^0.6.1",
38
- "@types/node": "^22.14.1",
39
- "@zayne-labs/tsconfig": "0.8.1",
38
+ "@types/node": "^22.15.18",
39
+ "@zayne-labs/tsconfig": "0.8.2",
40
40
  "clsx": "^2.1.1",
41
41
  "concurrently": "^9.1.2",
42
42
  "cross-env": "^7.0.3",
43
43
  "publint": "^0.3.12",
44
44
  "size-limit": "^11.2.0",
45
- "terser": "^5.39.0",
46
- "tsup": "^8.4.0",
45
+ "tsup": "^8.5.0",
47
46
  "typescript": "5.8.3",
48
- "vitest": "3.1.1"
47
+ "vitest": "3.1.3"
49
48
  },
50
49
  "publishConfig": {
51
50
  "access": "public",