Library
core
src
util
Readme

Lawtext core referencesDocs


Lawtext core references / core/src/util

core/src/util

Index

Classes

Type Aliases

Diff<T, U>

Diff<T, U>: T extends U ? never : T

Type Parameters

T

U

Defined in

core/src/util/index.ts:50 (opens in a new tab)


ResolvedType<T>

ResolvedType<T>: T extends PromiseLike<infer U> ? U : T

Type Parameters

T

Defined in

core/src/util/index.ts:20 (opens in a new tab)

Variables

pictMimeDict

const pictMimeDict: object

Type declaration

.bmp

readonly bmp: "image/bmp" = "image/bmp"

.gif

readonly gif: "image/gif" = "image/gif"

.jpeg

readonly jpeg: "image/jpeg" = "image/jpeg"

.jpg

readonly jpg: "image/jpeg" = "image/jpeg"

.pdf

readonly pdf: "application/pdf" = "application/pdf"

.png

readonly png: "image/png" = "image/png"

.svg

readonly svg: "image/svg+xml" = "image/svg+xml"

.tif

readonly tif: "image/tiff" = "image/tiff"

.tiff

readonly tiff: "image/tiff" = "image/tiff"

Defined in

core/src/util/index.ts:53 (opens in a new tab)

Functions

assertNever()

assertNever(x): never

Parameters

x: never

Returns

never

Defined in

core/src/util/index.ts:46 (opens in a new tab)


decodeBase64()

decodeBase64(base64): Uint8Array

Parameters

base64: string

Returns

Uint8Array

Defined in

core/src/util/index.ts:33 (opens in a new tab)


omit()

omit<T, K>(obj, ...keys): Omit<T, K>

Type Parameters

T

K extends string | number | symbol

Parameters

obj: T

• ...keys: K[]

Returns

Omit<T, K>

Defined in

core/src/util/index.ts:27 (opens in a new tab)


pick()

pick<T, K>(obj, ...keys): Pick<T, K>

Type Parameters

T

K extends string | number | symbol

Parameters

obj: T

• ...keys: K[]

Returns

Pick<T, K>

Defined in

core/src/util/index.ts:22 (opens in a new tab)


range()

range(start, end): Generator<number, void, unknown>

Parameters

start: number

end: number

Returns

Generator<number, void, unknown>

Defined in

core/src/util/index.ts:14 (opens in a new tab)


throttle()

throttle<TArgs>(func, waitms, initialWaitms?): (...args) => void

Type Parameters

TArgs extends unknown[]

Parameters

func

waitms: number

initialWaitms?: number

Returns

Function

Parameters

• ...args: TArgs

Returns

void

Defined in

core/src/util/index.ts:65 (opens in a new tab)


throwError()

throwError(): never

Returns

never

Defined in

core/src/util/index.ts:42 (opens in a new tab)


wait()

wait(ms): Promise<void>

Parameters

ms: number

Returns

Promise<void>

Defined in

core/src/util/index.ts:1 (opens in a new tab)


withTime()

withTime<TArgs, TRet>(func): (...args) => Promise<[number, TRet]>

Type Parameters

TArgs extends unknown[]

TRet

Parameters

func

Returns

Function

Parameters

• ...args: TArgs

Returns

Promise<[number, TRet]>

Defined in

core/src/util/index.ts:5 (opens in a new tab)