You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`src/index.tsx` re-exported only `NProgress` and `useNProgress`, so the
option shape and the hook's return shape reached the emitted declarations
as local interfaces with no exported names. Anyone typing a wrapper around
either entry point had to reach for `Parameters<typeof useNProgress>[0]`
and `ReturnType<typeof useNProgress>`.
`Options` is renamed to `NProgressOptions`, since `Options` is too generic
an identifier to put in a consumer's import namespace. The return shape,
previously an inline object type on `useNProgress` and spelled
`ReturnType<typeof useNProgress>` in the render-prop signature, is now
`NProgressState`. No MIGRATION.md entry: neither name was reachable from
the package entry point before this commit.
Both are type-only exports, so the runtime bundles are byte-identical:
ESM 997 B, CJS 1.06 kB gzipped, unchanged.
`test/bundles.spec.ts` already asserts facts about what the build emits,
so the public export surface is checked there, over the declaration files
it finds in `dist` rather than a hard-coded list.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The package exports one hook and one component. Both take the same [options](#options) and produce the same [values](#return-value), so the choice between them is a matter of which pattern suits the calling code.
75
+
The package exports one hook and one component. Both take the same [options](#options) and produce the same [values](#return-value), so the choice between them is a matter of which pattern suits the calling code. Both shapes are exported as types, for typing code that wraps either entry point:
0 commit comments