Skip to content

Commit 21f345e

Browse files
committed
2.0.2
1 parent ab5968d commit 21f345e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

lib/types.d.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,12 @@ export type OnError = (error: VFileMessage) => undefined | void
2727
/**
2828
* Options that define the severity of errors.
2929
*/
30-
export type ErrorOptions = Partial<
31-
Record<ErrorCode, ErrorSeverity | null | undefined>
32-
>
30+
export type ErrorOptions = Partial<Record<ErrorCode, ErrorSeverity | undefined>>
3331

3432
/**
3533
* Configuration.
3634
*/
37-
export interface Options extends ErrorOptions, FromParse5Options {
35+
export type Options = {
3836
/**
3937
* The `file` field from `hast-util-from-parse5` is not supported.
4038
*/
@@ -46,7 +44,7 @@ export interface Options extends ErrorOptions, FromParse5Options {
4644
* In document mode, unopened `html`, `head`, and `body` elements are opened
4745
* in just the right places.
4846
*/
49-
fragment?: boolean | null | undefined
47+
fragment?: boolean | undefined
5048
/**
5149
* Call `onerror` with parse errors while parsing (optional).
5250
*
@@ -59,5 +57,6 @@ export interface Options extends ErrorOptions, FromParse5Options {
5957
* that rules emit as warnings.
6058
* Rules can also be configured with `2`, to turn them into fatal errors.
6159
*/
62-
onerror?: OnError | null | undefined
63-
}
60+
onerror?: OnError | undefined
61+
} & ErrorOptions &
62+
FromParse5Options

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hast-util-from-html",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "hast utility to parse from HTML",
55
"license": "MIT",
66
"keywords": [

0 commit comments

Comments
 (0)