|
19 | 19 | * [API](#api)
|
20 | 20 | * [`headingRange(tree, test|options, handler)`](#headingrangetree-testoptions-handler)
|
21 | 21 | * [`Handler`](#handler)
|
| 22 | + * [`Info`](#info) |
22 | 23 | * [`Options`](#options)
|
23 | 24 | * [`Test`](#test)
|
24 | 25 | * [`TestFunction`](#testfunction)
|
25 |
| - * [`ZoneInfo`](#zoneinfo) |
26 | 26 | * [Types](#types)
|
27 | 27 | * [Compatibility](#compatibility)
|
28 | 28 | * [Security](#security)
|
@@ -160,9 +160,22 @@ Callback called when a section is found (TypeScript type).
|
160 | 160 | — nodes between `start` and `end`
|
161 | 161 | * `end` ([`Node`][node] or `undefined`)
|
162 | 162 | — end of section, if any
|
163 |
| -* `info` ([`ZoneInfo`][api-zoneinfo]) |
| 163 | +* `info` ([`Info`][api-info]) |
164 | 164 | — extra info
|
165 | 165 |
|
| 166 | +### `Info` |
| 167 | + |
| 168 | +Extra info (TypeScript type). |
| 169 | + |
| 170 | +###### Fields |
| 171 | + |
| 172 | +* `parent` ([`Node`][node]) |
| 173 | + — parent of the section |
| 174 | +* `start` (`number`) |
| 175 | + — index of `start` in `parent` |
| 176 | +* `end` (`number` or `null`) |
| 177 | + — index of `end` in `parent` |
| 178 | + |
166 | 179 | ###### Returns
|
167 | 180 |
|
168 | 181 | Results (`Array<Node | null | undefined>`, optional).
|
@@ -210,25 +223,12 @@ Check if a node matches (TypeScript type).
|
210 | 223 |
|
211 | 224 | Whether this is the heading that is searched for (`boolean`, optional).
|
212 | 225 |
|
213 |
| -### `ZoneInfo` |
214 |
| -
|
215 |
| -Extra info (TypeScript type). |
216 |
| -
|
217 |
| -###### Fields |
218 |
| -
|
219 |
| -* `parent` ([`Node`][node]) |
220 |
| - — parent of the section |
221 |
| -* `start` (`number`) |
222 |
| - — index of `start` in `parent` |
223 |
| -* `end` (`number` or `null`) |
224 |
| - — index of `end` in `parent` |
225 |
| -
|
226 | 226 | ## Types
|
227 | 227 |
|
228 | 228 | This package is fully typed with [TypeScript][].
|
229 | 229 | This package exports the types [`Handler`][api-handler],
|
230 |
| -[`Options`][api-options], [`Test`][api-test], |
231 |
| -[`TestFunction`][api-testfunction], and [`ZoneInfo`][api-zoneinfo]. |
| 230 | +[`Info`][api-info], [`Options`][api-options], [`Test`][api-test], |
| 231 | +and [`TestFunction`][api-testfunction]. |
232 | 232 |
|
233 | 233 | ## Compatibility
|
234 | 234 |
|
@@ -358,4 +358,4 @@ abide by its terms.
|
358 | 358 |
|
359 | 359 | [api-testfunction]: #testfunction
|
360 | 360 |
|
361 |
| -[api-zoneinfo]: #zoneinfo |
| 361 | +[api-info]: #info |
0 commit comments