MaibornWolff / metric-gardener

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

Bug with TS/TSX: method declaration in interface not counted for "functions" metric #212

Closed mylinhdao closed 4 months ago

mylinhdao commented 5 months ago

The method declarations are not counted as "functions" in these examples:

interface KeyValueProcessor{ functionName(key: number, value: string): void; } and interface KeyValueProcessor{ (key: number, value: string): void; };

As we already discussed in #98 , all method declarations should be counted. So we should at least count the first or maybe both method declarations as functions. Code example is from: https://www.tutorialsteacher.com/typescript/typescript-interface/#interface-as-function-type

mylinhdao commented 4 months ago

As discussed with @clemens-mw , we would count both of the above example for functions metric