The `to:` value of an object destination, or null when it has none or it is computed.
(args: string)
| 350 | |
| 351 | /** The `to:` value of an object destination, or null when it has none or it is computed. */ |
| 352 | function toKeyOf(args: string): string | null { |
| 353 | const end = matchBracket(args, 0); |
| 354 | if (end < 0) return null; |
| 355 | const field = readFields(args, 0, end).get('to'); |
| 356 | return field ? readStringAt(field.text.trimStart(), 0) : null; |
| 357 | } |
| 358 | |
| 359 | // ============================================================================= |
| 360 | // The resolver |
no test coverage detected