Describe the bug
The package exports a named Turnstile component at runtime, but the published TypeScript declarations do not declare that export.
Runtime (dist/index.js)
exports.useTurnstile = exports.Turnstile = void 0;
This allows:
import { Turnstile } from "react-turnstile";
to work at runtime.
Type declarations (dist/index.d.ts)
export declare function TurnstileTurnstile(...): JSX.Element;
export default Turnstile;
export declare function useTurnstile(): TurnstileObject;
There is no declaration for the named export Turnstile, so TypeScript reports:
Module '"react-turnstile"' has no exported member 'Turnstile'. Did you mean 'useTurnstile'?
Expected behavior
The TypeScript declarations should match the runtime exports so the named import works without TypeScript errors.
Additional context
I'm happy to work on a fix if this is considered a bug.
Describe the bug
The package exports a named
Turnstilecomponent at runtime, but the published TypeScript declarations do not declare that export.Runtime (
dist/index.js)This allows:
to work at runtime.
Type declarations (
dist/index.d.ts)There is no declaration for the named export
Turnstile, so TypeScript reports:Expected behavior
The TypeScript declarations should match the runtime exports so the named import works without TypeScript errors.
Additional context
I'm happy to work on a fix if this is considered a bug.