This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface Model { | |
| readonly name: string; | |
| readonly [key: string]: any; | |
| } | |
| type StrictKeys<T> = keyof { | |
| [K in keyof T as string extends K ? never : number extends K ? never : K]: T[K] | |
| }; | |
| function get<Key extends StrictKeys<Model>>(entity: Model, key: Key): Model[Key]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe('Vehicle Filter Utilities', () => { | |
| const baseLookup: VehicleLookupOption = { | |
| label: 'Honda Civic 2023', | |
| value: 'civic-2023', | |
| lookupValue: { | |
| make: ['Honda'], | |
| modelYear: ['2023'], | |
| } | |
| }; |