cognitive-complexity-ts
Version:
This program analyses TypeScript and JavaScript code according to the [Cognitive Complexity metric](https://www.sonarsource.com/docs/CognitiveComplexity.pdf). It produces a JSON summary and a GUI for exploring the complexity of your codebase.
24 lines (23 loc) • 548 B
TypeScript
export interface ColumnAndLine {
column: number;
line: number;
}
export interface FunctionNodeInfo extends ColumnAndLine {
name: string;
}
export interface ContainerOutput extends FunctionNodeInfo {
score: number;
inner: ContainerOutput[];
}
export interface FileOutput {
score: number;
inner: ContainerOutput[];
}
export type FolderOutput = {
[name: string]: FileOutput | FolderOutput;
};
export type ProgramOutput = FolderOutput;
export interface ScoreAndInner {
score: number;
inner: ContainerOutput[];
}