Skip to content

Commit

Permalink
Merge pull request #107 from grafana/allow-deeper-extends
Browse files Browse the repository at this point in the history
Allow deeper extends
  • Loading branch information
sam boyer authored Jul 23, 2023
2 parents e5c32fb + 4d591da commit 506f17d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,12 @@ func findExtends(v cue.Value) ([]ts.Expr, cue.Value, error) {
case cue.OrOp:
return valError(v, "typescript interfaces cannot be constructed from disjunctions")
case cue.SelectorOp:
deref := cue.Dereference(v)
_, dexpr := deref.Expr()
if dexpr[len(dexpr)-1].IncompleteKind() == cue.TopKind {
return walkExpr(deref)
}

expr, err := refAsInterface(v)
if err != nil {
return err
Expand Down

0 comments on commit 506f17d

Please sign in to comment.