# @textlint/types

> Type definition package for textlint

Latest version **15.8.0** (published 2026-08-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @textlint/types
pnpm add @textlint/types
yarn add @textlint/types
bun add @textlint/types
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 15.8.0 |
| Published | 2026-08-01 |
| First published | 2019-01-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 76.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Author | azu |
| Maintainers | azu, textlint-user |
| Keywords | definition, textlint, types, typescript |

## Links

- npm: https://www.npmjs.com/package/@textlint/types
- Repository: https://github.com/textlint/textlint
- Homepage: https://github.com/textlint/textlint/tree/master/packages/@textlint/types/
- Issues: https://github.com/textlint/textlint/issues
- npm.io page: https://npm.io/package/@textlint/types

## Dependencies (1)

- [@textlint/ast-node-types](https://npm.io/package/@textlint/ast-node-types.md) 15.8.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 15.8.0 (latest) — 2026-08-01
- 13.4.2-next.0 (next) — 2024-02-02
- 12.0.0-beta.3 (beta) — 2021-05-24
- 15.7.1 — 2026-05-18
- 15.7.0 — 2026-05-14
- 15.6.1 — 2026-05-11
- 15.6.0 — 2026-04-26
- 15.5.4 — 2026-04-09
- 15.5.2 — 2026-02-21
- 15.5.1 — 2026-01-19
- 15.5.0 — 2025-12-07
- 15.4.1 — 2025-12-03
- 15.4.0 — 2025-11-17
- 15.3.0 — 2025-11-10
- 15.2.3 — 2025-10-11
- … 88 more at https://npm.io/package/@textlint/types/versions

## README

# @textlint/types

Type definition and Typed object package for textlint and textlint rule.

If you import types from `@textlint/kernel` in your rule module, please use `@textlint/types` instead of it.

## Types

### Rule types

Rule types includes following definition.

- Rule module types
- Rule report function types
- Rule Context types

Rule types is depended from textlint's rule module and `@textlint/kernel`.
By contrasts, textlint's rule module should not depended on `@textlint/kernel`

- OK: Rule types <--- Rule module
- OK: Rule types <--- Kernel module
- NG: Kernel module <--- Rule module
- NG: Kernel module ---> Rule module

### Abstraction Layer

`@textlint/types` does not includes implementations.
In other words, It has only type definition file.

## Install

Install with [npm](https://www.npmjs.com/):

    npm install @textlint/types

## Usage

```ts
import type { TextlintSourceCode, TextlintSourceCodeArgs, TextlintSourceCodeLocation, TextlintSourceCodePosition, TextlintSourceCodeRange } from "@textlint/types";
import type { TextlintRuleContextFixCommand } from "@textlint/types";
import type { TextlintRuleContextFixCommandGenerator } from "@textlint/types";
import type { TextlintRuleError, TextlintRuleErrorPadding, TextlintRuleReportedObject } from "@textlint/types";
import type { TextlintRuleSeverityLevel } from "@textlint/types";
import type { TextlintRuleContext, TextlintRuleContextArgs, TextlintRuleContextReportFunction, TextlintRuleContextReportFunctionArgs } from "@textlint/types";
import type { TextlintRuleOptions } from "@textlint/types";
import type { TextlintRuleReporter, TextlintFixableRuleModule, TextlintRuleModule, TextlintRuleReportHandler } from "@textlint/types";
import type { TextlintFilterRuleContext, TextlintFilterRuleShouldIgnoreFunction, TextlintFilterRuleShouldIgnoreFunctionArgs } from "@textlint/types";
import type { TextlintFilterRuleModule, TextlintFilterRuleOptions, TextlintFilterRuleReporter, TextlintFilterRuleReportHandler } from "@textlint/types";
import type { TextlintPluginCreator, TextlintPluginOptions, TextlintPluginProcessor, TextlintPluginProcessorConstructor } from "@textlint/types";
```

## FAQ

### Occur incompatible types between `@textlint/types` and other module like `textlint-rule-helper`

You should check if your `@textlint/types` dependencies is duplicated.

`@textlint/types` should be deduped.

```
npm ls @textlint/types
```

If your dependencies is duplicated, you should update modules that are depended on `@textlint/types`.

## Versioning Policy

`@textlint/types` is not semantic versioning.
Because, This library provide only TypeScript definition.

It is hard that we follow a semantic versioning.

- patch: fix bugs, maybe includes breaking change
- minor: add new types,  maybe includes breaking change
- major: includes breaking change

## Changelog

See [Releases page](https://github.com/textlint/textlint/releases).

## Running tests

Install devDependencies and Run `npm test`:

    npm test

## Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, [please create an issue](https://github.com/textlint/textlint/issues).

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## Author

- [github/azu](https://github.com/azu)
- [twitter/azu_re](https://twitter.com/azu_re)

## License

MIT © azu

---
_Source: https://npm.io/package/@textlint/types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
