Skip to content

Feat/type opt #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ declare namespace tocbot {
// Options are: "debounce" or "throttle"
// when set auto , use debounce less than 333ms , other use throttle.
// for ios browser can't use history.pushState() more than 100 times per 30 seconds reason
scrollHandlerType?: "auto" | "debounce" | "throttle"
scrollHandlerType?: "auto" | "debounce" | "throttle"
// scrollHandler delay in ms.
scrollHandlerTimeout: number
scrollHandlerTimeout?: number
// Timeout between events firing to make sure it's
// not too rapid (for performance reasons).
throttleTimeout?: number
Expand Down Expand Up @@ -121,7 +121,7 @@ declare namespace tocbot {
// assuming `disableTocScrollSync` is set to false. This allows for
// scrolling an outer element (like a nav panel w/ search) containing the toc.
// Please pass an element, not a selector here.
tocScrollingWrapper: null
tocScrollingWrapper?: null
// Offset for the toc scroll (top) position when scrolling the page.
// Only effective if `disableTocScrollSync` is false.
tocScrollOffset?: number
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tocbot",
"version": "4.36.0",
"version": "4.36.1",
"description": "Generate a table of contents based on the heading structure of a html document.",
"main": "./dist/tocbot.cjs",
"module": "./index.js",
Expand Down