Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JumpLink committed Nov 27, 2023
1 parent 71548d6 commit 41127e7
Showing 1 changed file with 36 additions and 34 deletions.
70 changes: 36 additions & 34 deletions packages/lib/src/injection/injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,44 +39,46 @@ export class Injector {
)
})

if (toClass) {
if (toClass.staticFunctions) {
girClass._tsData.staticFunctions.push(
...this.girFactory.newGirFunctions(toClass.staticFunctions, girClass._tsData, { isInjected: true }),
)
}
if (toClass.properties) {
girClass._tsData.properties.push(
...this.girFactory.newGirProperties(toClass.properties, { isInjected: true }),
)
}
if (toClass.constructors) {
girClass._tsData.constructors.push(
...this.girFactory.newGirFunctions(toClass.constructors, girClass._tsData, { isInjected: true }),
)
}
if (toClass.methods) {
girClass._tsData.methods.push(
...this.girFactory.newGirFunctions(toClass.methods, girClass._tsData, { isInjected: true }),
)
}
if (toClass.virtualMethods) {
girClass._tsData.virtualMethods.push(
...this.girFactory.newGirFunctions(toClass.virtualMethods, girClass._tsData, { isInjected: true }),
)
}
if (toClass.propertySignalMethods) {
for (const propertySignalMethod of toClass.propertySignalMethods) {
propertySignalMethod.isInjected = true
girClass._tsData.propertySignalMethods.push(propertySignalMethod)
}
}
if (!toClass) {
return girClass
}

if (toClass.generics) {
girClass._tsData.generics.push(...this.girFactory.newGenerics(toClass.generics))
if (toClass.staticFunctions) {
girClass._tsData.staticFunctions.push(
...this.girFactory.newGirFunctions(toClass.staticFunctions, girClass._tsData, { isInjected: true }),
)
}
if (toClass.properties) {
girClass._tsData.properties.push(
...this.girFactory.newGirProperties(toClass.properties, { isInjected: true }),
)
}
if (toClass.constructors) {
girClass._tsData.constructors.push(
...this.girFactory.newGirFunctions(toClass.constructors, girClass._tsData, { isInjected: true }),
)
}
if (toClass.methods) {
girClass._tsData.methods.push(
...this.girFactory.newGirFunctions(toClass.methods, girClass._tsData, { isInjected: true }),
)
}
if (toClass.virtualMethods) {
girClass._tsData.virtualMethods.push(
...this.girFactory.newGirFunctions(toClass.virtualMethods, girClass._tsData, { isInjected: true }),
)
}
if (toClass.propertySignalMethods) {
for (const propertySignalMethod of toClass.propertySignalMethods) {
propertySignalMethod.isInjected = true
girClass._tsData.propertySignalMethods.push(propertySignalMethod)
}
}

if (toClass.generics) {
girClass._tsData.generics.push(...this.girFactory.newGenerics(toClass.generics))
}

return girClass
}

Expand Down

0 comments on commit 41127e7

Please sign in to comment.