@zayne-labs/toolkit-type-helpers 0.8.49 → 0.8.52

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,6 +4,7 @@ type Prettify<TObject> = NonNullable<unknown> & {
4
4
  type UnmaskType<TType> = {
5
5
  _: TType;
6
6
  }["_"];
7
+ type NonFalsy<TType> = TType extends "" | 0 | 0n | false | null | undefined ? never : TType;
7
8
  type PrettyOmit<TObject, Key extends keyof TObject> = Prettify<Omit<TObject, Key>>;
8
9
  type PrettyPick<TObject, Key extends keyof TObject> = Prettify<Pick<TObject, Key>>;
9
10
  type CallbackFn<in TParams, out TResult = void> = (...params: TParams[]) => TResult;
@@ -104,4 +105,10 @@ declare const assert: AssertFn;
104
105
 
105
106
  declare const defineEnum: <const TValue, TVariant extends WriteableVariantUnion = "shallow">(value: TValue) => Writeable<TValue, TVariant> extends infer T ? { [Key in keyof T]: Writeable<TValue, TVariant>[Key]; } : never;
106
107
 
107
- export { type AnyAsyncFunction, type AnyFunction, type AnyNumber, type AnyObject, type AnyString, AssertionError, type CallbackFn, type ExtractUnion, type LiteralUnion, type NonEmptyArray, type Prettify, type PrettyOmit, type PrettyPick, type SelectorFn, type UnionDiscriminator, type UnionDiscriminatorRequired, type UnknownObject, type UnknownObjectWithAnyKey, type UnmaskType, type Writeable, type WriteableVariantUnion, assert, assertDefined, assertENV, defineEnum, hasObjectPrototype, isArray, isAsyncFunction, isBoolean, isFile, isFormData, isFunction, isIterable, isNumber, isObject, isObjectAndNotArray, isPlainObject, isString, isSymbol };
108
+ declare global {
109
+ interface BooleanConstructor {
110
+ <T>(value?: T | null): value is T;
111
+ }
112
+ }
113
+
114
+ export { type AnyAsyncFunction, type AnyFunction, type AnyNumber, type AnyObject, type AnyString, AssertionError, type CallbackFn, type ExtractUnion, type LiteralUnion, type NonEmptyArray, type NonFalsy, type Prettify, type PrettyOmit, type PrettyPick, type SelectorFn, type UnionDiscriminator, type UnionDiscriminatorRequired, type UnknownObject, type UnknownObjectWithAnyKey, type UnmaskType, type Writeable, type WriteableVariantUnion, assert, assertDefined, assertENV, defineEnum, hasObjectPrototype, isArray, isAsyncFunction, isBoolean, isFile, isFormData, isFunction, isIterable, isNumber, isObject, isObjectAndNotArray, isPlainObject, isString, isSymbol };
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.8.49",
4
+ "version": "0.8.52",
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",