# types/axis.types.ts

> 42 lines of code and 8 definitions.

Tree: GovLab Quality
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/quality#file-quality-types-axis-types-ts
Source text: https://banes-lab.com/source/quality/types/axis.types.ts.txt

Listed in [types](https://banes-lab.com/api/source/quality/types.md), after [types/access.types.ts](https://banes-lab.com/source/quality/types/access.types.ts.md) and before [types/binding.types.ts](https://banes-lab.com/source/quality/types/binding.types.ts.md).

## Definitions

- `AxisPlugins` (interface_declaration, line 4, exported)
- `AxisSpec` (interface_declaration, line 10, exported)
- `AxisSecondaryOptions` (interface_declaration, line 19, exported)
- `ForeignFn` (type_alias_declaration, line 24, exported)
- `RedefinedFn` (type_alias_declaration, line 26, exported)
- `AxisMessages` (interface_declaration, line 28, exported)
- `AxisContext` (interface_declaration, line 34, exported)
- `AxisRuleInputs` (interface_declaration, line 45, exported)

## Contained in

- [types](https://banes-lab.com/anatomy/quality/folder-quality-types.md)

## Source

```typescript
import type { GovlabStylelintMeta, StylelintRuleMeta } from "#types/stylelint.types";
import type { Plugin, PostcssResult, RuleMessages } from "stylelint";

export interface AxisPlugins {
    meta: GovlabStylelintMeta[];
    plugins: Plugin[];
    rules: Record<string, [true, { home: string; steps: string[] }]>;
}

export interface AxisSpec {
    attrToken: string;
    label: string;
    meta: StylelintRuleMeta;
    owns: string;
    ruleId: string;
    ruleName: string;
}

export interface AxisSecondaryOptions {
    home?: string;
    steps?: string[];
}

export type ForeignFn = (selector: string, home: string) => string;

export type RedefinedFn = (step: string) => string;

export interface AxisMessages {
    foreign: ForeignFn;
    messages: RuleMessages;
    redefined: RedefinedFn;
}

export interface AxisContext {
    attrToken: string;
    foreign: ForeignFn;
    home: string;
    isHome: boolean;
    redefined: RedefinedFn;
    result: PostcssResult;
    ruleName: string;
    validSteps: Set<string>;
}

export interface AxisRuleInputs {
    spec: AxisSpec;
    built: AxisMessages;
    primary: unknown;
    secondaryOptions: unknown;
}
```
