adjacent_overload_signatures

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AdjacentOverloadSignaturesRule = rule.CreateRule(rule.Rule{
	Name: "adjacent-overload-signatures",
	Run: func(ctx rule.RuleContext, options any) rule.RuleListeners {

		checkBodyForOverloadMethods(ctx, &ctx.SourceFile.Node)

		return rule.RuleListeners{
			ast.KindBlock: func(node *ast.Node) {
				checkBodyForOverloadMethods(ctx, node)
			},
			ast.KindClassDeclaration: func(node *ast.Node) {
				checkBodyForOverloadMethods(ctx, node)
			},
			ast.KindInterfaceDeclaration: func(node *ast.Node) {
				checkBodyForOverloadMethods(ctx, node)
			},
			ast.KindModuleBlock: func(node *ast.Node) {
				checkBodyForOverloadMethods(ctx, node)
			},
			ast.KindTypeLiteral: func(node *ast.Node) {
				checkBodyForOverloadMethods(ctx, node)
			},
		}
	},
})

Functions

This section is empty.

Types

type Method

type Method struct {
	CallSignature bool
	Name          string
	Static        bool
	NameType      utils.MemberNameType
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL