Skip to content

Commit

Permalink
2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 22, 2024
1 parent ab5968d commit 21f345e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions lib/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ export type OnError = (error: VFileMessage) => undefined | void
/**
* Options that define the severity of errors.
*/
export type ErrorOptions = Partial<
Record<ErrorCode, ErrorSeverity | null | undefined>
>
export type ErrorOptions = Partial<Record<ErrorCode, ErrorSeverity | undefined>>

/**
* Configuration.
*/
export interface Options extends ErrorOptions, FromParse5Options {
export type Options = {
/**
* The `file` field from `hast-util-from-parse5` is not supported.
*/
Expand All @@ -46,7 +44,7 @@ export interface Options extends ErrorOptions, FromParse5Options {
* In document mode, unopened `html`, `head`, and `body` elements are opened
* in just the right places.
*/
fragment?: boolean | null | undefined
fragment?: boolean | undefined
/**
* Call `onerror` with parse errors while parsing (optional).
*
Expand All @@ -59,5 +57,6 @@ export interface Options extends ErrorOptions, FromParse5Options {
* that rules emit as warnings.
* Rules can also be configured with `2`, to turn them into fatal errors.
*/
onerror?: OnError | null | undefined
}
onerror?: OnError | undefined
} & ErrorOptions &
FromParse5Options
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hast-util-from-html",
"version": "2.0.1",
"version": "2.0.2",
"description": "hast utility to parse from HTML",
"license": "MIT",
"keywords": [
Expand Down

0 comments on commit 21f345e

Please sign in to comment.