Skip to content

Commit 6147a14

Browse files
committed
Remove exports of AST types
This commit removes `RefractorElement`, `RefractorRoot`, `Root`, `Text`. Get them from `@types/hast` instead.
1 parent 5fb62fa commit 6147a14

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

index.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
1-
// To do: Old export names, remove next major.
2-
/**
3-
* @typedef {import('./lib/core.js').RefractorRoot} RefractorRoot
4-
* @typedef {import('./lib/core.js').RefractorElement} RefractorElement
5-
* @typedef {import('hast').Text} Text
6-
*/
7-
81
// Old and new names:
92
/**
103
* @typedef {import('prismjs').Grammar} Grammar
114
* @typedef {import('./lib/core.js').Syntax} Syntax
125
*/
136

14-
// New names:
15-
/**
16-
* @typedef {import('./lib/core.js').RefractorRoot} Root
17-
*/
18-
197
export {refractor} from './lib/common.js'

readme.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ Yields:
149149

150150
This package exports the identifier [`refractor`][api-refractor].
151151
It also exports the [TypeScript][] types
152-
[`Grammar`][api-grammar],
153-
[`Root`][api-root],
152+
[`Grammar`][api-grammar]
154153
and
155154
[`Syntax`][api-syntax].
156155
There is no default export.
@@ -799,8 +798,6 @@ See [How to Contribute to Open Source][opensource-guide].
799798

800799
[api-refractor]: #refractor
801800

802-
[api-root]: #root
803-
804801
[api-syntax]: #syntax
805802

806803
[badge-build-image]: https://github.com/wooorm/refractor/workflows/main/badge.svg

0 commit comments

Comments
 (0)