Consider the sample of inter-dependent code (below) that makes use of decorators.
Now consider the following workflow (yes, I do want to pass the actual exported cla
How about doing the same, but structuring your code differently?
If both Child
and Parent
reside in the same file then it shouldn't be a problem.
That might not sound optimal as it's comfortable to separate code to modules due to length and logic, but that can be solved in a way.
You can have a main file that has base classes for those, even abstract:
// Base.ts
import {Test} from "./Decorators";
@Test(BaseChild)
export abstract class BaseParent {}
@Test(BaseParent)
export abstract class BaseChild {}
And then in your specific modules:
// Parent.ts
import {BaseParent} from "./Base";
export class Parent extends BaseParent {}
And
// Child.ts
import {BaseChild} from "./Base";
export class Child extends BaseChild {}