()
| 208 | * Checks that the given list of keys completely covers all supported keys in the given interface. |
| 209 | */ |
| 210 | export function strictKeysOf<T>() { |
| 211 | return <U extends Array<keyof T>>( |
| 212 | array: U & ([keyof T] extends [U[number]] ? unknown : Array<["Needs to be all of", T]>) |
| 213 | ) => array; |
| 214 | } |
| 215 | |
| 216 | /** |
| 217 | * Will throw an error if the provided object contains any properties that aren't in the provided list. |
no outgoing calls
no test coverage detected