(ref: Reference<T>)
| 191 | * Resolves the given reference and returns the target AST node. Throws an error if the reference is not resolved. |
| 192 | */ |
| 193 | export function resolved<T extends AstNode>(ref: Reference<T>): T { |
| 194 | if (!ref.ref) { |
| 195 | throw new Error(`Reference not resolved: ${ref.$refText}`); |
| 196 | } |
| 197 | return ref.ref; |
| 198 | } |
| 199 | |
| 200 | /** |
| 201 | * Gets all base models and mixins of a data model or type def, recursively. |
no outgoing calls
no test coverage detected