Skip to content

Commit

Permalink
fix: emitting data to static and already decorated items
Browse files Browse the repository at this point in the history
  • Loading branch information
Farenheith committed Sep 24, 2024
1 parent 777907f commit 30ce74e
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/plugin/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ import { moduleExists } from './module-exists';
import { tsBinary } from './ts-loader';
import { Key, ModifiersMetadata } from '../meta-type';

function isStatic(
node: ts.MethodDeclaration | ts.ClassDeclaration | ts.PropertyDeclaration,
) {
return node.modifiers?.find((x) => x.kind === ts.SyntaxKind.StaticKeyword);
}

type TypedNode = Pick<ts.ParameterDeclaration, 'type'>;

type NodeWithParameters = Pick<ts.MethodDeclaration, 'parameters'>;
Expand Down Expand Up @@ -91,9 +85,7 @@ export function before() {
} else if (
(tsBinary.isMethodDeclaration(node) ||
tsBinary.isPropertyDeclaration(node) ||
tsBinary.isClassDeclaration(node)) &&
!tsBinary.getDecorators(node)?.length &&
!isStatic(node)
tsBinary.isClassDeclaration(node))
) {
let identifier: string;
const modifiers = getProperties(node);
Expand Down

0 comments on commit 30ce74e

Please sign in to comment.