(ref: nga.ReferenceMetadata)
| 557 | } |
| 558 | |
| 559 | export function refToExpression(ref: nga.ReferenceMetadata): o.Expression { |
| 560 | if (ref.localAlias) { |
| 561 | return o.variable(ref.localAlias); |
| 562 | } |
| 563 | if (ref.consumerImport) { |
| 564 | return new o.ExternalExpr({ |
| 565 | moduleName: ref.consumerImport.specifier, |
| 566 | name: ref.consumerImport.symbol, |
| 567 | } as any); |
| 568 | } |
| 569 | return o.variable(refName(ref)); |
| 570 | } |
| 571 | |
| 572 | /** |
| 573 | * Converts a `ReferenceMetadata` to an expression suitable for `.d.ts` type parameter emission |
no test coverage detected