Skip to content

Commit a12431f

Browse files
chore: fix check public exports script
1 parent a5e6592 commit a12431f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.build/check-public-exports/index.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,10 @@ const searchForDecoratedClasses = (source: ts.SourceFile) => {
124124

125125
decoratedClassNodes
126126
.forEach(decoratedClassNode => {
127-
decoratedClassNode.decorators
128-
.forEach(decoratorNode => {
127+
const decorators = ts.canHaveDecorators(decoratedClassNode) ? ts.getDecorators(decoratedClassNode) : undefined;
128+
decorators?.forEach(decoratorNode => {
129129
const className = getChildren(decoratedClassNode)
130-
.find(classNode => ts.isIdentifier(classNode))
131-
.getText();
130+
.find(classNode => ts.isIdentifier(classNode))?.getText() ?? '';
132131

133132
const [decoratorName] = getChildren(decoratorNode.expression)
134133
.map(expressionNode => expressionNode.getText());

0 commit comments

Comments
 (0)