Skip to content

Commit

Permalink
Remove unnecessary glimmer parent handling
Browse files Browse the repository at this point in the history
  • Loading branch information
gitKrystan committed Dec 29, 2023
1 parent de7f183 commit b4091b9
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/types/glimmer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export function isGlimmerTemplate(node: Node): node is Node & GlimmerTemplate {
}

export type GlimmerTemplateParent =
| GlimmerStatement
| GlimmerStatementTS
| GlimmerExportDefaultDeclaration
| GlimmerExportDefaultDeclarationTS;
Expand All @@ -57,27 +56,12 @@ export function isGlimmerTemplateParent(
if (!node) return false;

return (
isGlimmerTemplate(node) ||
isGlimmerStatement(node) ||
isGlimmerStatementTS(node) ||
isGlimmerExportDefaultDeclaration(node) ||
isGlimmerExportDefaultDeclarationTS(node)
);
}

type GlimmerStatement = BlockStatement & GlimmerTemplateProperties;

/**
* Type predicate for:
*
* ```gts
* <template></template>;
* ```
*/
function isGlimmerStatement(node: Node): node is GlimmerStatement {
return node.type === 'BlockStatement' && isGlimmerTemplate(node);
}

type GlimmerStatementTS = ExpressionStatement & {
expression: TSAsExpression & {
expression: ObjectExpression & GlimmerTemplateProperties;
Expand Down

0 comments on commit b4091b9

Please sign in to comment.