Skip to content

Commit

Permalink
Export Event type
Browse files Browse the repository at this point in the history
This enables users to refer to the EventParser as `Iterable<Event>`
which is much more readable than `ReturnType<typeof parseEvents>`.
  • Loading branch information
not-my-profile committed Jan 3, 2025
1 parent fa7a699 commit 1feaa39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,4 +1119,4 @@ const parseEvents = function(input : string, options : Options = {}) {
return new EventParser(input, options);
}

export { parseEvents }
export { parseEvents, type Event }
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { parse, renderAST } from "./parse";
export { parseEvents } from "./block";
export { parseEvents, type Event } from "./block";
export { renderHTML, HTMLRenderer } from "./html";
export { applyFilter } from "./filter";
export { fromPandoc, toPandoc } from "./pandoc";
Expand Down

0 comments on commit 1feaa39

Please sign in to comment.