Genese complexity report

<- tty.d.ts
Methods : 26
Complexity index : 11.6
Cyclomatic complexity : 24
Cognitive complexity
100 % Correct 26/26
0 % Warning 0/26 (threshold : 10)
0 % Error 0/26 (threshold : 20)
Cyclomatic complexity
100 % Correct 26/26
0 % Warning 0/26 (threshold : 5)
0 % Error 0/26 (threshold : 10)
Methods of tty.d.ts
isatty Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                
            
                function isatty(fd: number): boolean; // ------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
Complexity Index 0.4 Cyclomatic complexity 0
                            
                                
                
                    constructor(fd: number, options?: net.SocketConstructorOpts); // ------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
setRawMode Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
                    setRawMode(mode: boolean): this; // ------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
Complexity Index 0.1 Cyclomatic complexity 0
                            
                                
                
                    constructor(fd: number); // ----------------- +0.1 Complexity index (+0.1 atomic)
            
                            
                        
addListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: string, listener: (...args: any[]) => void): this; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
addListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "resize", listener: () => void): this; // ------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
emit Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
            
                    emit(event: string | symbol, ...args: any[]): boolean; // ---------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
emit Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "resize"): boolean; // ------------------------------ +0.3 Complexity index (+0.3 atomic)
            
                            
                        
on Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    on(event: string, listener: (...args: any[]) => void): this; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
on Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "resize", listener: () => void): this; // ------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
once Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    once(event: string, listener: (...args: any[]) => void): this; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
once Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "resize", listener: () => void): this; // ------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    prependListener(event: string, listener: (...args: any[]) => void): this; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
prependListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "resize", listener: () => void): this; // ------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    prependOnceListener(event: string, listener: (...args: any[]) => void): this; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "resize", listener: () => void): this; // ------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
clearLine Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
            
                    /**
                     * Clears the current line of this WriteStream in a direction identified by `dir`.
                     */
                    clearLine(dir: Direction, callback?: () => void): boolean; // ------------------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
clearScreenDown Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Clears this `WriteStream` from the current cursor down.
                     */
                    clearScreenDown(callback?: () => void): boolean; // ----------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
cursorTo Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Moves this WriteStream's cursor to the specified position.
                     */
                    cursorTo(x: number, y?: number, callback?: () => void): boolean; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
cursorTo Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                    
                    cursorTo(x: number, callback: () => void): boolean; // -------------------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
moveCursor Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Moves this WriteStream's cursor relative to its current position.
                     */
                    moveCursor(dx: number, dy: number, callback?: () => void): boolean; // -------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
getColorDepth Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * @default `process.env`
                     */
                    getColorDepth(env?: {}): number; // ------------------------------------------ +0.2 Complexity index (+0.2 atomic)
            
                            
                        
hasColors Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
                    hasColors(depth?: number): boolean; // ------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
hasColors Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
                    hasColors(env?: {}): boolean; // ------------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
hasColors Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    hasColors(depth: number, env?: {}): boolean; // ------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
getWindowSize Complexity Index 0.1 Cyclomatic complexity 1
                            
                                
                    
                    getWindowSize(): [number, number]; // ----------------- +0.1 Complexity index (+0.1 atomic)