@textlint/ast-node-types
TypeScript icon, indicating that this package has built-in type declarations

14.0.4 • Public • Published

@textlint/ast-node-types

The definition for textlint AST Node types.

This module for parse plugin.

For more details, see TxtNode document.

Installation

npm install @textlint/ast-node-types

Usage

import { ASTNodeTypes } from "@textlint/ast-node-types";
console.log(ASTNodeTypes.Document); // => string

Type interface for TxtNode

This library include type interface of TxtNode. TypeScript user can use it as type of TxtNode.

// type interface
import { TxtNode } from "@textlint/ast-node-types";

For parser creator

Please use it for creating your textlint-plugin parser.

Use it by

  • textlint internal
  • @textlint/text-to-ast
  • @textlint/markdown-to-ast

Versioning

  • major: Breaking Change
  • minor: Adding new type
  • patch: Fixing issues

Tests

npm test

Contributing

If you want to new type for AST, Please file issue :)

  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

License

MIT

Dependents (40)

Package Sidebar

Install

npm i @textlint/ast-node-types

Weekly Downloads

255,122

Version

14.0.4

License

MIT

Unpacked Size

143 kB

Total Files

42

Last publish

Collaborators

  • textlint-user
  • azu
  • 0x6b