callsignature

package
v0.3.44 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package callsignature defines the target-independent parameter contract used to bind TypeRB calls across source modules, interfaces, and backends.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasNamedOnly

func HasNamedOnly(parameters []Parameter) bool

func Types

func Types(parameters []Parameter) []types.Type

Types

type Parameter

type Parameter struct {
	Kind     ParameterKind
	Label    string
	Type     types.Type
	Presence Presence
}

Parameter is the public call contract for one parameter. Label is populated only for named-only parameters; positional source names are not part of the call signature.

func FromPositionalTypes

func FromPositionalTypes(parameters []types.Type, required int) []Parameter

type ParameterKind

type ParameterKind string
const (
	Positional ParameterKind = "positional"
	NamedOnly  ParameterKind = "named-only"
)

type Presence

type Presence string
const (
	Required  Presence = "required"
	Omittable Presence = "omittable"
)

Jump to

Keyboard shortcuts

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