An interface which allows you to extend the types of SomeId to include your own custom types via declaration merging.
⚠️Warning: This is an advanced feature, and should only be used if you really need to use a type for the _id field which isn't present in SomeId for whatever reason.
To use this, you may merge the SomeIdTypes interface into your own project to specify additional allowed types for document IDs.
This is especially useful if your system uses custom scalar representations (e.g. branded types or custom datatypes) that are not part of the default set.
The field may be called anything except for baseTypes, as that is reserved for the default types.
✏️Note: This is a global declaration merging, so you should only do this once in your project.
Overview
An interface which allows you to extend the types of SomeId to include your own custom types via declaration merging.
To use this, you may merge the
SomeIdTypes
interface into your own project to specify additional allowed types for document IDs.The field may be called anything except for
baseTypes
, as that is reserved for the default types.Examples
In this example after declaration merging, the SomeId will now also accept
{ $uuid: string }
andBigNumber
as valid values for_id
.Example
In this example, SomeId will be set to
any
.Example
See
SomeId