Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "types/index"

Index

Type aliases

AsyncReturnType

AsyncReturnType: ReturnType<TAsyncRoutine> extends Promise<infer TResult> ? TResult : never

Defines the result of the Promise return by the specified AsyncRoutine

AsyncRoutine

AsyncRoutine: function

Defines an asyncronous routine, which is typically marked with async qualifier, with arguments specified as a tuple type TArgs and return type as Promise<TRet>.

Type declaration

    • (...args: TArgs): Promise<TRet>
    • Parameters

      • Rest ...args: TArgs

      Returns Promise<TRet>

BasicObjectMap

BasicObjectMap: object

Defines an object type with the keys being in TKey type union and values of TValue type.

remarks

All vanilla TypeScript Object properties, such as .toString, .hasOwnProperty do not get mapped.

Type declaration

BasicTypeName

BasicTypeName: "number" | "string" | "boolean" | "undefined" | "object" | "function" | "symbol" | "bigint"

Defines a union of all possible strings retuned by applying typeof operator.

ClassPrototype

ClassPrototype: TClass["prototype"]

Defines constructor function prototype property type.

FilterProps

FilterProps: object

Defines an object type which properties are all taken from TObj and their values are assignable to TValue.

param

Defines which class of properties to take. See FilterOpts for details

Type declaration

FilteredPropNames

FilteredPropNames: { [TKey in keyof TObj]: TFilterOpt extends FilterOpts.Assignable ? TObj[TKey] extends TValue ? TKey : never : TFilterOpt extends FilterOpts.NotAssignable ? TObj[TKey] extends TValue ? never : TKey : TFilterOpt extends FilterOpts.Containing ? Extract<TObj[TKey], TValue> extends never ? never : TKey : TFilterOpt exten...

Defines a union of property names taken from TObj which value type is assignable to TValue.

MappedObject

MappedObject: object

Defines an object type with the same keys as TSourceObjects, but all values of TMappedValue.

Type declaration

MarkUndefedPropsAsOptional

MarkUndefedPropsAsOptional: object & object

Maybe

Maybe: T | null | undefined

Defines a type T that may also be null or undefined.

PathArray

PathArray: (string | number)[]

PrimitiveType

PrimitiveType: number | string | boolean | undefined | symbol | null | bigint

Defines a union of all possible value types defined in the language.

remarks

null and undefined are considered to be primitive types.

PromiseResult

PromiseResult: TPromise extends Promise<infer TResult> ? TResult : never

Defines the type of result, which is passed to TPromise.then(cb) cb callback.

PropNamesArray

PropNamesArray: keyof TObject[]

RemoveProperties

RemoveProperties: object

Defines the same object type as TSourceObject, but without TPropName properties.

param

A single or union type of properties to remove from TSourceObject.

Type declaration

ReplaceProperty

ReplaceProperty: object

Defines the same object type as TSourceObject, but with TPropName property having the value of type TNewPropType.

Type declaration

Routine

Routine: function

Defines a syncronous (if not TRet extends Promise) routine with arguments specified as a tuple type TArgs and return type as TRet.

Type declaration

    • (...args: TArgs): TRet
    • Parameters

      • Rest ...args: TArgs

      Returns TRet

Take

Take: object

Defines an object type with the TPropNames properties subset taken from TSourceObject

Type declaration

UnionToIntersection

UnionToIntersection: PackIntoFunctionParam<TUnion> extends (param: infer TItem) => void ? TItem : never

Defines an intersection type of all union items.

remarks

Because of TypeScript boolean representation as type boolean = true | false you get the following result: UnionToIntersection<boolean> === true & false

copyright

https://stackoverflow.com/a/50375286/9259330

Generated using TypeDoc