Genese complexity report

<- readline.d.ts
Methods : 66
Complexity index : 35.5
Cyclomatic complexity : 64
Cognitive complexity
100 % Correct 66/66
0 % Warning 0/66 (threshold : 10)
0 % Error 0/66 (threshold : 20)
Cyclomatic complexity
100 % Correct 66/66
0 % Warning 0/66 (threshold : 5)
0 % Error 0/66 (threshold : 10)
Methods of readline.d.ts
Complexity Index 1.1 Cyclomatic complexity 0
                            
                                
                    
            
                    /**
                     * NOTE: According to the documentation:
                     *
                     * > Instances of the `readline.Interface` class are constructed using the
                     * > `readline.createInterface()` method.
                     *
                     * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
                     */
                    protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean); // ------- +1.1 Complexity index (+1.1 atomic)
            
                            
                        
Complexity Index 0.2 Cyclomatic complexity 0
                            
                                
                    
                    /**
                     * NOTE: According to the documentation:
                     *
                     * > Instances of the `readline.Interface` class are constructed using the
                     * > `readline.createInterface()` method.
                     *
                     * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
                     */
                    protected constructor(options: ReadLineOptions); // ------------------------------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
setPrompt Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                    
            
                    setPrompt(prompt: string): void; // ----------------------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
prompt Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    prompt(preserveCursor?: boolean): void; // ------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
question Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
                    question(query: string, callback: (answer: string) => void): void; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
pause Complexity Index 0.1 Cyclomatic complexity 1
                            
                                
                    
                    pause(): this; // ----------------------------------------------------------- +0.1 Complexity index (+0.1 atomic)
            
                            
                        
resume Complexity Index 0.1 Cyclomatic complexity 1
                            
                                
                    
                    resume(): this; // ------- +0.1 Complexity index (+0.1 atomic)
            
                            
                        
close Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
                    close(): void; // -------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
write Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
                    write(data: string | Buffer, key?: Key): void; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
getCursorPos Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
            
                    /**
                     * Returns the real position of the cursor in relation to the input
                     * prompt + string.  Long input (wrapping) strings, as well as multiple
                     * line prompts are included in the calculations.
                     */
                    getCursorPos(): CursorPos; // ---------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
addListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    /**
                     * events.EventEmitter
                     * 1. close
                     * 2. line
                     * 3. pause
                     * 4. resume
                     * 5. SIGCONT
                     * 6. SIGINT
                     * 7. SIGTSTP
                     */
            
                    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: "close", listener: () => void): this; // -------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
addListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "line", listener: (input: string) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
addListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "pause", listener: () => void): this; // ------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
addListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "resume", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
addListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "SIGCONT", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
addListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "SIGINT", listener: () => void): this; // -------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
addListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "SIGTSTP", 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: "close"): boolean; // ------------------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
emit Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "line", input: string): boolean; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
emit Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "pause"): boolean; // --------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
emit Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "resume"): boolean; // ------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
emit Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "SIGCONT"): boolean; // ------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
emit Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "SIGINT"): boolean; // -------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
emit Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "SIGTSTP"): 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: "close", listener: () => void): this; // -------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
on Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "line", listener: (input: string) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
on Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "pause", listener: () => void): this; // ------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
on Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "resume", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
on Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "SIGCONT", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
on Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "SIGINT", listener: () => void): this; // -------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
on Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "SIGTSTP", 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: "close", listener: () => void): this; // -------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
once Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "line", listener: (input: string) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
once Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "pause", listener: () => void): this; // ------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
once Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "resume", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
once Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "SIGCONT", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
once Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "SIGINT", listener: () => void): this; // -------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
once Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "SIGTSTP", 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: "close", listener: () => void): this; // -------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "line", listener: (input: string) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
prependListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "pause", listener: () => void): this; // ------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "resume", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "SIGCONT", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "SIGINT", listener: () => void): this; // -------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "SIGTSTP", 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: "close", listener: () => void): this; // -------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "line", listener: (input: string) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "pause", listener: () => void): this; // ------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "resume", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "SIGCONT", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "SIGINT", listener: () => void): this; // -------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "SIGTSTP", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                    
                    [Symbol.asyncIterator](): AsyncIterableIterator<string>; // ----------------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
createInterface Complexity Index 1.3 Cyclomatic complexity 1
                            
                                
                
            
                function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface; // ------- +1.3 Complexity index (+1.3 atomic)
            
                            
                        
createInterface Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                
                function createInterface(options: ReadLineOptions): Interface; // ------------------------------------------------------------------------------------------------------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
emitKeypressEvents Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
                function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
clearLine Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Clears the current line of this WriteStream in a direction identified by `dir`.
                 */
                function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
clearScreenDown Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                
                /**
                 * Clears this `WriteStream` from the current cursor down.
                 */
                function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; // ----------------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
cursorTo Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                
                /**
                 * Moves this WriteStream's cursor to the specified position.
                 */
                function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
moveCursor Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                
                /**
                 * Moves this WriteStream's cursor relative to its current position.
                 */
                function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; // ------- +0.8 Complexity index (+0.8 atomic)