( descriptor: string | undefined, text: string, pos: number, )
| 173 | } |
| 174 | |
| 175 | function assertDescriptor( |
| 176 | descriptor: string | undefined, |
| 177 | text: string, |
| 178 | pos: number, |
| 179 | ): asserts descriptor is string { |
| 180 | if (!descriptor) { |
| 181 | throw new Error(getErrorMessage('key descriptor', text[pos], text)) |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | function getEnumValue<T>(f: Record<string, T>, key: string): T | undefined { |
| 186 | return f[key] |
no test coverage detected