MaibornWolff / metric-gardener

BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

Discussion TS/TSX: which type alias should be counted for "classes" metric #213

Closed mylinhdao closed 5 months ago

mylinhdao commented 5 months ago

There are many ways to write a type alias in TS/TSX see this cheat sheet . We should clarify which of them should be counted for "classes" metric, especially these kind of type aliases:

type union = {a: 1} & {b: 2};
type intersect = {a: 1} | {b: 2}; // object
type tuple = [name: string, age: number];

The result of this discussion must be applied to PR #199

ChristianHuehn commented 5 months ago

I propose that we leave those out of classes metrics for now. But will come up with an idea on how to count parts of them as interfaces for class metrics