/** * Matching what was written at a call site against what the callee takes. * * This is the half of call checking that knows nothing about types: which * argument fills which parameter, and what is missing, doubled or unknown. * `language.md` 11.2 is the whole rule, and it is the same rule for a library * call and for a user function, which is why this takes a parameter list rather * than either kind of callee. * * Six codes live here, and each of them names the call, so the reader is told * which of the three calls on the line the caret is about. */ import type { Argument } from '../ast/index.js'; import type { Span } from '../span/index.js'; import type { Checker } from './checker.js'; /** What a parameter list looks like to this file, whatever declared it. */ export interface ParameterShape { readonly name: string; readonly optional: boolean; } /** * The parameters in declaration order, holding the argument that filled each. * * A hole is a parameter the call left to its default. The generator reads this * rather than the written order, so it never matches a label a second time. */ export type Binding = readonly (Argument | undefined)[]; /** `ema(src, len)`, with a `?` on the parameters that carry a default. */ export declare function signatureText(name: string, parameters: readonly ParameterShape[]): string; /** `2`, or `2 to 5` where some parameters have defaults. */ export declare function arityText(parameters: readonly ParameterShape[]): string; /** * Fills the parameter list from the arguments as written. * * Positional arguments fill from the left and named ones fill by label, which * is the order `language.md` 11.2 allows. A positional argument after a named * one is OS3005 and is reported once rather than once per argument: the mistake * is the boundary, not each argument past it. */ export declare function bindArguments(checker: Checker, span: Span, args: readonly Argument[], name: string, parameters: readonly ParameterShape[]): Binding; //# sourceMappingURL=arguments.d.ts.map