UNPKG

@ngworker/router-component-store

Version:

A strictly typed lightweight alternative to NgRx Router Store (@ngrx/router-store) and ActivatedRoute

15 lines (14 loc) 438 B
/** * Remove `symbol` index signature from the specified type. * * @example <caption>Usage</caption> * ``` * type RouteData = { [key: string | symbol]: any; }; * type SerializableRouteData = OmitSymbolIndex<RouteData>; * ``` * * `SerializableRouteData` is `{ [key: string]: any }`. */ export type OmitSymbolIndex<TShape> = { [TShapeKey in keyof TShape as symbol extends TShapeKey ? never : TShapeKey]: TShape[TShapeKey]; };