@koine/utils 2.0.0-beta.146 → 2.0.0-beta.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +2 -2
- package/package.json +1 -1
- package/types.d.ts +15 -0
package/index.d.ts
CHANGED
|
@@ -155,8 +155,8 @@ export { uppercase } from "./uppercase";
|
|
|
155
155
|
export { uuid } from "./uuid";
|
|
156
156
|
export { uuidNumeric } from "./uuidNumeric";
|
|
157
157
|
export { wait } from "./wait";
|
|
158
|
-
export type { AnythingFalsy, FlatObjectFirstLevel, KeysStartsWith, KeysTailsStartsWith, PickStartsWith, PickStartsWithTails, Reverse, } from "./types";
|
|
158
|
+
export type { AnythingFalsy, FlatObjectFirstLevel, KeysStartsWith, KeysTailsStartsWith, PickStartsWith, PickStartsWithTails, Reverse, TestType, } from "./types";
|
|
159
159
|
/**
|
|
160
160
|
* These types should not be documented by using [`excludeExternals` TypeDoc flag](https://typedoc.org/options/input/#excludeexternals)
|
|
161
161
|
*/
|
|
162
|
-
export type { KeysOfUnion, EmptyObject, IsEmptyObject, NonEmptyObject, UnknownRecord, UnknownArray, Except, TaggedUnion, Writable, WritableDeep, Merge, MergeDeep, MergeDeepOptions, MergeExclusive, RequireAtLeastOne, RequireExactlyOne, RequireAllOrNone, RequireOneOrNone, OmitIndexSignature, PickIndexSignature, PartialDeep, PartialDeepOptions, RequiredDeep, PickDeep, PartialOnUndefinedDeep, PartialOnUndefinedDeepOptions, UndefinedOnPartialDeep, ReadonlyDeep, LiteralUnion, Promisable, Opaque, UnwrapOpaque, Tagged, UnwrapTagged, InvariantOf, SetOptional, SetReadonly, SetRequired, SetNonNullable, ValueOf, AsyncReturnType, ConditionalExcept, ConditionalKeys, ConditionalPick, ConditionalPickDeep, ConditionalPickDeepOptions, UnionToIntersection, Stringified, FixedLengthArray, MultidimensionalArray, MultidimensionalReadonlyArray, IterableElement, Entry, Entries, SetReturnType, SetParameterType, Asyncify, Simplify, Jsonify, Jsonifiable,
|
|
162
|
+
export type { KeysOfUnion, DistributedOmit, DistributedPick, EmptyObject, IsEmptyObject, IfEmptyObject, NonEmptyObject, UnknownRecord, UnknownArray, Except, TaggedUnion, Writable, WritableDeep, Merge, MergeDeep, MergeDeepOptions, MergeExclusive, RequireAtLeastOne, RequireExactlyOne, RequireAllOrNone, RequireOneOrNone, SingleKeyObject, OmitIndexSignature, PickIndexSignature, PartialDeep, PartialDeepOptions, RequiredDeep, PickDeep, OmitDeep, PartialOnUndefinedDeep, PartialOnUndefinedDeepOptions, UndefinedOnPartialDeep, ReadonlyDeep, LiteralUnion, Promisable, Opaque, UnwrapOpaque, Tagged, GetTagMetadata, UnwrapTagged, InvariantOf, SetOptional, SetReadonly, SetRequired, SetNonNullable, ValueOf, AsyncReturnType, ConditionalExcept, ConditionalKeys, ConditionalPick, ConditionalPickDeep, ConditionalPickDeepOptions, UnionToIntersection, Stringified, StringSlice, FixedLengthArray, MultidimensionalArray, MultidimensionalReadonlyArray, IterableElement, Entry, Entries, SetReturnType, SetParameterType, Asyncify, Simplify, SimplifyDeep, Jsonify, JsonObject, Jsonifiable, StructuredCloneable, Schema, LiteralToPrimitive, LiteralToPrimitiveDeep, PositiveInfinity, NegativeInfinity, Finite, Integer, Float, NegativeFloat, Negative, NonNegative, NegativeInteger, NonNegativeInteger, IsNegative, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual, Sum, Subtract, StringKeyOf, Exact, ReadonlyTuple, OptionalKeysOf, OverrideProperties, HasOptionalKeys, RequiredKeysOf, HasRequiredKeys, ReadonlyKeysOf, HasReadonlyKeys, WritableKeysOf, HasWritableKeys, Spread, IsInteger, IsFloat, TupleToUnion, IntRange, IsEqual, IsLiteral, IsStringLiteral, IsNumericLiteral, IsBooleanLiteral, IsSymbolLiteral, IsAny, IfAny, IsNever, IfNever, IsUnknown, IfUnknown, ArrayIndices, ArrayValues, ArraySlice, ArraySplice, ArrayTail, SetFieldType, Paths, SharedUnionFieldsDeep, IsNull, IfNull, And, Or, NonEmptyTuple, FindGlobalInstanceType, FindGlobalType, CamelCase, CamelCasedProperties, CamelCasedPropertiesDeep, KebabCase, KebabCasedProperties, KebabCasedPropertiesDeep, PascalCase, PascalCasedProperties, PascalCasedPropertiesDeep, SnakeCase, SnakeCasedProperties, SnakeCasedPropertiesDeep, ScreamingSnakeCase, DelimiterCase, DelimiterCasedProperties, DelimiterCasedPropertiesDeep, Join, Split, Trim, Replace, Includes, Get, LastArrayElement, GlobalThis, PackageJson, TsConfigJson, } from "type-fest";
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import type { Replace } from "type-fest";
|
|
2
|
+
/**
|
|
3
|
+
* Type to test types
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* type _Test = TestType<
|
|
9
|
+
* A extends B ? true : false,
|
|
10
|
+
* A & { intruder: 1 } extends B ? false : true
|
|
11
|
+
* >;
|
|
12
|
+
* // or, if you want to skip the wrong implementation test, simply
|
|
13
|
+
* type _Test = TestType<A extends B ? true : false>;
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export type TestType<RightImplementation extends true, WrongImplementation extends true = true> = RightImplementation | WrongImplementation;
|
|
2
17
|
/**
|
|
3
18
|
* Whatever that in javascript returns `false` when checked in an `if` condition
|
|
4
19
|
*/
|