Skip to content

Commit 9e27227

Browse files
committed
Fix type name
1 parent 668b2a7 commit 9e27227

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
/**
22
* @typedef {import('./lib/index.js').Handler} Handler
3-
* @typedef {import('./lib/index.js').ZoneInfo} ZoneInfo
3+
* @typedef {import('./lib/index.js').Info} Info
44
*/
55

6+
/**
7+
* @typedef {Info} ZoneInfo
8+
* Deprecated: use `Info`.
9+
*/
10+
// To do: next major: remove `ZoneInfo.
11+
612
export {zone} from './lib/index.js'

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @typedef {Root | Content} Node
99
* @typedef {Extract<Node, MdastParent>} Parent
1010
*
11-
* @typedef ZoneInfo
11+
* @typedef Info
1212
* Extra info.
1313
* @property {Parent} parent
1414
* Parent of the section.
@@ -25,7 +25,7 @@
2525
* Nodes between `start` and `end`.
2626
* @param {Node} end
2727
* End of section.
28-
* @param {ZoneInfo} info
28+
* @param {Info} info
2929
* Extra info.
3030
* @returns {Array<Node | null | undefined> | null | undefined | void}
3131
* Results.

readme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* [API](#api)
2020
* [`zone(tree, name, handler)`](#zonetree-name-handler)
2121
* [`Handler`](#handler)
22-
* [`ZoneInfo`](#zoneinfo)
22+
* [`Info`](#info)
2323
* [Types](#types)
2424
* [Compatibility](#compatibility)
2525
* [Security](#security)
@@ -149,7 +149,7 @@ Callback called when a section is found (TypeScript type).
149149
— nodes between `start` and `end`
150150
* `end` ([`Node`][node])
151151
— end of section
152-
* `info` ([`ZoneInfo`][api-zoneinfo])
152+
* `info` ([`Info`][api-info])
153153
— extra info
154154

155155
###### Returns
@@ -160,7 +160,7 @@ If nothing is returned, nothing will be changed.
160160
If an array of nodes (can include `null` and `undefined`) is returned, the
161161
original section will be replaced by those nodes.
162162

163-
### `ZoneInfo`
163+
### `Info`
164164

165165
Extra info (TypeScript type).
166166

@@ -177,7 +177,7 @@ Extra info (TypeScript type).
177177

178178
This package is fully typed with [TypeScript][].
179179
It exports the additional types [`Handler`][api-handler] and
180-
[`ZoneInfo`][api-zoneinfo].
180+
[`Info`][api-info].
181181

182182
## Compatibility
183183

@@ -295,4 +295,4 @@ abide by its terms.
295295

296296
[api-handler]: #handler
297297

298-
[api-zoneinfo]: #zoneinfo
298+
[api-info]: #info

0 commit comments

Comments
 (0)