Skip to content

Commit

Permalink
check if is in heritage clause
Browse files Browse the repository at this point in the history
class A extends X(<template></template>) {
}
  • Loading branch information
patricklx authored Mar 18, 2024
1 parent 8d9e274 commit 54344ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/transform/template/inlining/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export function isEmbeddedInClass(ts: TSLib, node: ts.Node): boolean {
// TODO: this should likely actually filter on whether the template appears in a
// static block or property definition, but just "am I in a class body" is the
// current status quo and has been ok so far.
if (ts.isHeritageClause(current)) {
return false;
}
if (ts.isClassLike(current)) {
return true;
}
Expand Down

0 comments on commit 54344ba

Please sign in to comment.