I have a standard router typing.
type Routes = '/' | '/achievements' | ... ;
This allows you to understand which routers are in the project. But now I have the task to make an array containing all the routers.
const allRoutes: Routes[] = ['/', '/achievements'];
If any router is missing, it should get an error. This array must always contain all routers. How can it be done?
I can't figure out how to require the array to contain the entire enumeration of routers.
UPDATE
My types are described in the file d.ts. So I cannot declare the construct
const ROUTES = ['/', '/achievements'] as const
and export it there