@mocanvas/editor · function

isCustomRecordId

declare function isCustomRecordId<Type extends string = string>(id: unknown, type?: Type): id is TLCustomRecordId<Type>

Whether id is a custom record id — optionally, one of a particular type.

``ts isCustomRecordId(id) // any custom record isCustomRecordId(id, "review") // a review specifically ``

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.