18
18
* [ Use] ( #use )
19
19
* [ API] ( #api )
20
20
* [ ` affixEmoticonModifier(node) ` ] ( #affixemoticonmodifiernode )
21
- * [ ` Emoticon ` ] ( #emoticon )
22
21
* [ Types] ( #types )
23
22
* [ Compatibility] ( #compatibility )
24
23
* [ Related] ( #related )
@@ -111,13 +110,16 @@ RootNode[1] (1:1-1:25, 0-24)
111
110
## API
112
111
113
112
This package exports the identifier
114
- [ ` affixEmoticonModifier ` ] [ affixemoticonmodifier ] .
113
+ [ ` affixEmoticonModifier ` ] [ api-affix-emoticon-modifier ] .
115
114
There is no default export.
116
115
117
116
### ` affixEmoticonModifier(node) `
118
117
119
118
Merge emoticons in ` node ` into ` EmoticonNode ` s.
120
119
120
+ See [ ` Emoticon ` in ` nlcst-emoticon-modifier ` ] [ emoticon-mofifier-emoticon ] for
121
+ that type.
122
+
121
123
###### Parameters
122
124
123
125
* ` node ` ([ ` Paragraph ` ] [ paragraph ] )
@@ -127,38 +129,13 @@ Merge emoticons in `node` into `EmoticonNode`s.
127
129
128
130
Nothing (` undefined ` ).
129
131
130
- ### ` Emoticon `
131
-
132
- Emoticon node (TypeScript type).
133
-
134
- See [ ` Emoticon ` in ` nlcst-emoticon-modifier ` ] [ emoticon-mofifier-emoticon ] .
135
-
136
132
## Types
137
133
138
134
This package is fully typed with [ TypeScript] [ ] .
139
- It exports the additional type [ ` Emoticon ` ] [ emoticon ] .
140
-
141
- It also registers the ` Emoticon ` node type with ` @types/nlcst ` in
142
- ` SentenceContentMap ` .
143
- If you’re working with the syntax tree, make sure to import this utility
144
- somewhere in your types, as that registers the new node types in the tree.
145
-
146
- <!-- To do: remove. -->
135
+ It exports no additional types.
147
136
148
- ``` js
149
- /**
150
- * @typedef {import('nlcst-affix-emoticon-modifier')}
151
- */
152
-
153
- import {visit } from ' unist-util-visit'
154
-
155
- /** @type {import('nlcst').Root} */
156
- const tree = getNodeSomeHow ()
157
-
158
- visit (tree, function (node ) {
159
- // `node` can now be a `Emoticon` node.
160
- })
161
- ```
137
+ See [ ` Emoticon ` in ` nlcst-emoticon-modifier ` ] [ emoticon-mofifier-emoticon ] for
138
+ how to register that type.
162
139
163
140
## Compatibility
164
141
@@ -251,6 +228,4 @@ abide by its terms.
251
228
252
229
[ emoticon-mofifier-emoticon ] : https://github.com/syntax-tree/nlcst-emoticon-modifier#emoticon
253
230
254
- [ affixemoticonmodifier ] : #affixemoticonmodifiernode
255
-
256
- [ emoticon ] : #emoticon
231
+ [ api-affix-emoticon-modifier ] : #affixemoticonmodifiernode
0 commit comments