Skip to content

Commit df2ac00

Browse files
committed
Remove Emoticon type
1 parent abdd0a1 commit df2ac00

File tree

2 files changed

+8
-37
lines changed

2 files changed

+8
-37
lines changed

index.js

-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
/**
2-
* @typedef {import('nlcst-emoticon-modifier').Emoticon} Emoticon
3-
*/
4-
51
export {affixEmoticonModifier} from './lib/index.js'

readme.md

+8-33
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
* [Use](#use)
1919
* [API](#api)
2020
* [`affixEmoticonModifier(node)`](#affixemoticonmodifiernode)
21-
* [`Emoticon`](#emoticon)
2221
* [Types](#types)
2322
* [Compatibility](#compatibility)
2423
* [Related](#related)
@@ -111,13 +110,16 @@ RootNode[1] (1:1-1:25, 0-24)
111110
## API
112111

113112
This package exports the identifier
114-
[`affixEmoticonModifier`][affixemoticonmodifier].
113+
[`affixEmoticonModifier`][api-affix-emoticon-modifier].
115114
There is no default export.
116115

117116
### `affixEmoticonModifier(node)`
118117

119118
Merge emoticons in `node` into `EmoticonNode`s.
120119

120+
See [`Emoticon` in `nlcst-emoticon-modifier`][emoticon-mofifier-emoticon] for
121+
that type.
122+
121123
###### Parameters
122124

123125
* `node` ([`Paragraph`][paragraph])
@@ -127,38 +129,13 @@ Merge emoticons in `node` into `EmoticonNode`s.
127129

128130
Nothing (`undefined`).
129131

130-
### `Emoticon`
131-
132-
Emoticon node (TypeScript type).
133-
134-
See [`Emoticon` in `nlcst-emoticon-modifier`][emoticon-mofifier-emoticon].
135-
136132
## Types
137133

138134
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.
147136

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.
162139

163140
## Compatibility
164141

@@ -251,6 +228,4 @@ abide by its terms.
251228

252229
[emoticon-mofifier-emoticon]: https://github.com/syntax-tree/nlcst-emoticon-modifier#emoticon
253230

254-
[affixemoticonmodifier]: #affixemoticonmodifiernode
255-
256-
[emoticon]: #emoticon
231+
[api-affix-emoticon-modifier]: #affixemoticonmodifiernode

0 commit comments

Comments
 (0)