Skip to content

Commit a0f4f4b

Browse files
benkroegerfb55
andauthored
feat(Parser): exports Handler interface from Parser (#1690)
Co-authored-by: Felix <[email protected]>
1 parent 59b3538 commit a0f4f4b

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

.eslintrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@
6868
"@typescript-eslint/no-unnecessary-condition": 2,
6969
"@typescript-eslint/switch-exhaustiveness-check": 2,
7070
"@typescript-eslint/prefer-nullish-coalescing": 2,
71+
"@typescript-eslint/consistent-type-imports": [
72+
2,
73+
{ "fixStyle": "inline-type-imports" }
74+
],
75+
"@typescript-eslint/consistent-type-exports": 2,
7176

7277
"n/no-unsupported-features/es-syntax": 0
7378
}

src/Parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Tokenizer, { Callbacks, QuoteType } from "./Tokenizer.js";
1+
import Tokenizer, { type Callbacks, QuoteType } from "./Tokenizer.js";
22
import { fromCodePoint } from "entities/lib/decode.js";
33

44
const formTags = new Set([

src/WritableStream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Parser, Handler, ParserOptions } from "./Parser.js";
1+
import { Parser, type Handler, type ParserOptions } from "./Parser.js";
22
/*
33
* NOTE: If either of these two imports produces a type error,
44
* please update your @types/node dependency!

src/index.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import { Parser, ParserOptions } from "./Parser.js";
2-
export { Parser, type ParserOptions } from "./Parser.js";
1+
import { Parser, type ParserOptions } from "./Parser.js";
2+
export type { Handler, ParserOptions } from "./Parser.js";
3+
export { Parser } from "./Parser.js";
34

45
import {
56
DomHandler,
6-
DomHandlerOptions,
7-
ChildNode,
8-
Element,
9-
Document,
7+
type DomHandlerOptions,
8+
type ChildNode,
9+
type Element,
10+
type Document,
1011
} from "domhandler";
1112

1213
export {

0 commit comments

Comments
 (0)