Module @trova-trip/trova-types

@trova-trip/trova-types

This is the TrovaTrip utility types package. All types from type-fest are available.

import { SetOptional } from '@trova-trip/trova-types';

interface User {
id: string;
email: string;
}

type UserWithOptionalId = SetOptional<User, 'id'>;

const user: UserWithOptionalId = {
email: 'example@test.com'
};

Array

Entries
Entry
FixedLengthArray
Get
Includes
Join
LastArrayElement
MergeDeep
MultidimensionalArray
MultidimensionalReadonlyArray
PartialDeep
ReadonlyDeep
RequiredDeep
TupleToUnion
TypedArray
WritableDeep

Async

Asyncify
AsyncReturnType
Promisable

Change case

CamelCase
CamelCasedProperties
CamelCasedPropertiesDeep
DelimiterCase
DelimiterCasedProperties
DelimiterCasedPropertiesDeep
KebabCase
KebabCasedProperties
KebabCasedPropertiesDeep
PascalCase
PascalCasedProperties
PascalCasedPropertiesDeep
ScreamingSnakeCase
SnakeCase
SnakeCasedProperties
SnakeCasedPropertiesDeep

Class

AbstractClass
AbstractConstructor
Class
Constructor

File

PackageJson
TsConfigJson

Function

SetReturnType

Iterable

IterableElement

JSON

JsonArray
Jsonifiable
Jsonify
JsonObject
JsonPrimitive
JsonValue

Map

Entries
Entry
PartialDeep
ReadonlyDeep
RequiredDeep
WritableDeep

Numeric

Finite
Float
Integer
Negative
NegativeFloat
NegativeInfinity
NegativeInteger
NonNegative
NonNegativeInteger
PositiveInfinity

Object

CamelCasedProperties
CamelCasedPropertiesDeep
ConditionalExcept
ConditionalKeys
ConditionalPick
ConditionalPickDeep
DelimiterCasedProperties
DelimiterCasedPropertiesDeep
EmptyObject
Entries
Entry
Except
Get
IsEmptyObject
KebabCasedProperties
KebabCasedPropertiesDeep
LiteralToPrimitiveDeep
Merge
MergeDeep
MergeExclusive
OmitIndexSignature
OverrideProperties
PartialDeep
PartialOnUndefinedDeep
PascalCasedProperties
PascalCasedPropertiesDeep
PickIndexSignature
ReadonlyDeep
RequireAllOrNone
RequireAtLeastOne
RequiredDeep
RequireExactlyOne
Schema
SetNonNullable
SetOptional
SetReadonly
SetRequired
Simplify
SnakeCasedProperties
SnakeCasedPropertiesDeep
Spread
Stringified
StringKeyOf
ValueOf
Writable
WritableDeep

Observable

ObservableLike
Observer
OnComplete
OnError
OnNext
Unsubscribable

Other

PackageJson
TsConfigJson
ConditionalPickDeepOptions
MergeDeepOptions
PartialDeepOptions
PartialOnUndefinedDeepOptions
RemoveIndexSignature → OmitIndexSignature

Set

Entries
Entry
PartialDeep
ReadonlyDeep
RequiredDeep
WritableDeep

String

Replace
Split
Trim

Template literal

CamelCase
CamelCasedProperties
CamelCasedPropertiesDeep
DelimiterCase
DelimiterCasedProperties
DelimiterCasedPropertiesDeep
Get
Join
KebabCase
KebabCasedProperties
KebabCasedPropertiesDeep
LastArrayElement
PascalCase
PascalCasedProperties
PascalCasedPropertiesDeep
Replace
ScreamingSnakeCase
SnakeCase
SnakeCasedProperties
SnakeCasedPropertiesDeep
Split
Trim

Type

GlobalThis
InvariantOf
LiteralToPrimitive
LiteralToPrimitiveDeep
LiteralUnion
Opaque
Primitive
UnionToIntersection
UnwrapOpaque

Type Guard

IfAny
IfNever
IfUnknown
IsAny
IsBooleanLiteral
IsEqual
IsLiteral
IsNever
IsNumericLiteral
IsStringLiteral
IsSymbolLiteral

Utilities

Exact
HasOptionalKeys
HasRequiredKeys
IfAny
IfNever
IfUnknown
IsAny
IsBooleanLiteral
IsEqual
IsLiteral
IsNever
IsNumericLiteral
IsStringLiteral
IsSymbolLiteral
IsUnknown
MergeDeep
OptionalKeysOf
ReadonlyKeysOf
ReadonlyTuple
RequiredDeep
RequiredKeysOf
TaggedUnion
WritableKeysOf