UNPKG

1.27 kBMarkdownView Raw
1# @textlint/ast-node-types
2
3The definition for textlint AST Node types.
4
5This module for parse plugin.
6
7
8For more details, see [TxtNode document](https://github.com/textlint/textlint/blob/master/docs/txtnode.md).
9
10## Installation
11
12 npm install @textlint/ast-node-types
13
14## Usage
15
16```js
17import { ASTNodeTypes } from "@textlint/ast-node-types";
18console.log(ASTNodeTypes.Document); // => string
19```
20
21### Type interface for TxtNode
22
23This library include type interface of [TxtNode](https://github.com/textlint/textlint/blob/master/docs/txtnode.md).
24TypeScript user can use it as type of TxtNode.
25
26```ts
27// type interface
28import { TxtNode } from "@textlint/ast-node-types";
29
30```
31
32
33## For parser creator
34
35Please use it for creating your textlint-plugin parser.
36
37Use it by
38
39- textlint internal
40- `@textlint/text-to-ast`
41- `@textlint/markdown-to-ast`
42
43## Versioning
44
45- major: Breaking Change
46- minor: Adding new type
47- patch: Fixing issues
48
49## Tests
50
51 npm test
52
53## Contributing
54
55If you want to new type for AST, Please file issue :)
56
571. Fork it!
582. Create your feature branch: `git checkout -b my-new-feature`
593. Commit your changes: `git commit -am 'Add some feature'`
604. Push to the branch: `git push origin my-new-feature`
615. Submit a pull request :D
62
63## License
64
65MIT