assertIdType

Public Function

Assert whether an id correspond to a record type.

Example
assertIdType(myId, ID<MyRecord>)
Parameters
NameDescription

id

string | undefined

The id to check.

type

RecordType<R, any>

The type of the record.

Returns
asserts id is ID<R>
References

BaseRecord, RecordType, id, ID

Edit this page
Last edited on 11 May 2023
AllRecordsBaseRecord