Skip to content

Minimise Routes enum #81

@robb-j

Description

@robb-j

It should only contain the routes that the framework needs, then anything else can be added by the framework user.

The current enum should be deprecated and a new minimal one added, e.g.

enum DeconfRoutes {
  Session = 'session',
  ...
}

Then a framework user can:

import { DeconfRoutes } from '@openlab/deconf-ui-toolkit'

enum AppRoutes {
  CustomPage = 'customPage'
}

// For convenience, you could do this?
// https://stackoverflow.com/questions/52857698/extending-enum-in-typescript
const Routes = { ...AppRoutes, ...DeconfRoutes }
type Routes = AppRoutes | DeconfRoutes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions