# configuration/strings/invocation.strings.ts

> 30 lines of code and 13 definitions.

Tree: Argv Contract
Language: typescript
Layer: product
Canonical: https://banes-lab.com/anatomy/argv#file-argv-configuration-strings-invocation-strings-ts
Source text: https://banes-lab.com/source/argv/configuration/strings/invocation.strings.ts.txt

Listed in [configuration/strings](https://banes-lab.com/api/source/argv/configuration/strings.md).

## Definitions

- `refusedLine` (lexical_declaration, line 16, exported)
- `undeclaredFlag` (lexical_declaration, line 20, exported)
- `repeatedFlag` (lexical_declaration, line 24, exported)
- `missingValue` (lexical_declaration, line 28, exported)
- `tooManyPositionals` (lexical_declaration, line 32, exported)
- `tooFewPositionals` (lexical_declaration, line 40, exported)
- `REST_NOTE` (lexical_declaration, line 1, exported)
- `REPEATABLE_NOTE` (lexical_declaration, line 3, exported)
- `FLAGS_SLOT` (lexical_declaration, line 5, exported)
- `VALUE_SLOT` (lexical_declaration, line 7, exported)
- `HELP_ROW` (lexical_declaration, line 9, exported)
- `CLOSING` (lexical_declaration, line 11, exported)
- `HELP_UNANSWERED` (lexical_declaration, line 14, exported)

## Contained in

- [configuration/strings](https://banes-lab.com/anatomy/argv/folder-argv-configuration-strings.md)

## Used by

- [core/converters/invocation.converter.ts](https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md)
- [core/resolvers/invocation.resolver.ts](https://banes-lab.com/source/argv/core/resolvers/invocation.resolver.ts.md)

## Linked from

- [core/converters](https://banes-lab.com/anatomy/argv/folder-argv-core-converters.md)
- [core/resolvers](https://banes-lab.com/anatomy/argv/folder-argv-core-resolvers.md)

## Source

```typescript
export const REST_NOTE = " (passed through unread once every positional is given)";

export const REPEATABLE_NOTE = " (repeatable)";

export const FLAGS_SLOT = "[flags]";

export const VALUE_SLOT = "<value>";

export const HELP_ROW = "print this contract and exit before any effect";

export const CLOSING =
    "An undeclared flag is refused rather than ignored, because a word the script does not read still runs the script.";

export const HELP_UNANSWERED = "help was requested, which a programmatic caller cannot answer";

export const refusedLine = function refusedLine(reason: string, usage: string): string {
    return `REFUSED — ${reason}\n\n${usage}`;
};

export const undeclaredFlag = function undeclaredFlag(word: string, command: string): string {
    return `${word} is not a flag ${command} declares`;
};

export const repeatedFlag = function repeatedFlag(word: string): string {
    return `${word} was given more than once and is not repeatable`;
};

export const missingValue = function missingValue(word: string): string {
    return `${word} takes a value and none followed it`;
};

export const tooManyPositionals = function tooManyPositionals(
    given: number,
    declared: number,
    words: readonly string[],
): string {
    return `${String(given)} positional argument(s) given, ${String(declared)} declared: ${words.join(" ")}`;
};

export const tooFewPositionals = function tooFewPositionals(given: number, required: number): string {
    return `${String(given)} positional argument(s) given, ${String(required)} required`;
};
```
