Skip to content

Commit 7946376

Browse files
committedMar 11, 2025
Remove export of Grammar type
Get it from `@types/prismjs` instead.
1 parent 6147a14 commit 7946376

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed
 

‎index.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
// Old and new names:
21
/**
3-
* @typedef {import('prismjs').Grammar} Grammar
42
* @typedef {import('./lib/core.js').Syntax} Syntax
53
*/
64

‎readme.md

+1-26
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ and elegant virtual syntax highlighting using [Prism][github-prism].
2020
* [Use](#use)
2121
* [API](#api)
2222
* [`refractor`](#refractor-1)
23-
* [`Grammar`](#grammar)
2423
* [`Root`](#root)
2524
* [`Syntax`](#syntax)
2625
* [Examples](#examples)
@@ -148,9 +147,7 @@ Yields:
148147
## API
149148

150149
This package exports the identifier [`refractor`][api-refractor].
151-
It also exports the [TypeScript][] types
152-
[`Grammar`][api-grammar]
153-
and
150+
It also exports the [TypeScript][] type
154151
[`Syntax`][api-syntax].
155152
There is no default export.
156153

@@ -322,26 +319,6 @@ Yields:
322319
]
323320
```
324321

325-
### `Grammar`
326-
327-
Grammar.
328-
329-
###### Type
330-
331-
```ts
332-
export type {Grammar} from 'prismjs'
333-
```
334-
335-
### `Root`
336-
337-
Tree representing HTML.
338-
339-
###### Type
340-
341-
```ts
342-
export type {Root} from 'hast'
343-
```
344-
345322
### `Syntax`
346323

347324
Refractor syntax function.
@@ -794,8 +771,6 @@ See [How to Contribute to Open Source][opensource-guide].
794771

795772
<!-- Definitions -->
796773

797-
[api-grammar]: #grammar
798-
799774
[api-refractor]: #refractor
800775

801776
[api-syntax]: #syntax

0 commit comments

Comments
 (0)
Please sign in to comment.