Skip to content
module@warp-drive/legacy/compat/utils @legacy

Function expectId()

Call Signature

ts
function expectId(id): string;

Defined in: warp-drive-packages/legacy/src/compat/utils.ts:172

Like formattedId, but asserts that id is not null rather than allowing and passing through null.

Parameters

id

string | number

Returns

string

Call Signature

ts
function expectId(id): never;

Defined in: warp-drive-packages/legacy/src/compat/utils.ts:178

Throws, since id is null.

Parameters

id

null

Returns

never

Released under the MIT License.