lib/rules/adjacent-overload-signatures.js
function checkBodyForOverloadMethods(node) {
            const members = node.body || node.members;

            if (members) {
                let name;
                let index;
                let lastName;
                const seen = [];

                members.forEach(member => {
                    name = getMemberName(member);

                    index = seen.indexOf(name);
                    if (index > -1 && lastName !== name) {
                        context.report({
                            node: member,
                            messageId: "adjacentSignature",
                            data: {
                                name,
                            },
                        });
                    } else if (name && index === -1) {
                        seen.push(name);
                    }

                    lastName = name;
                });
            }
        }
function checkBodyForOverloadMethods(node) {
            const members = node.body || node.members;

            if (members) {
                let name;
                let index;
                let lastName;
                const seen = [];

                members.forEach(member => {
                    name = getMemberName(member);

                    index = seen.indexOf(name);
                    if (index > -1 && lastName !== name) {
                        context.report({
                            node: member,
                            messageId: "adjacentSignature",
                            data: {
                                name,
                            },
                        });
                    } else if (name && index === -1) {
                        seen.push(name);
                    }

                    lastName = name;
                });
            }
        }
function checkBodyForOverloadMethods ( node ) { const members = node . body || node . members ; if ( members ) { let name ; let index ; let lastName ; const seen = [ ] ; members . forEach ( member => { name = getMemberName ( member ) ; index = seen . indexOf ( name ) ; if ( index > - 1 && lastName !== name ) { context . report ( { node : member , messageId : "adjacentSignature" , data : { name , } , } ) ; } else if ( name && index === - 1 ) { seen . push ( name ) ; } lastName = name ; } ) ; } }
Check the body for overload methods.
@param {ASTNode} node the body to be inspected.
@returns {void}
@private
Check the body for overload methods .