react-typewriter-effect
react-typewriter-effect copied to clipboard
Support for typescript
Is there a way to get the eclaration file for this module?
Hey, I also needed typescript support and after not finding it I decided to make one myself. Since the author has not answered the issue I'll leave my React Typewriter component fully compatible with Typescript and React 18.0+ here: npm i react-ts-typewriter
I am also using this package with a typescript, so I defined the type temporarily as below.
// types/index.d.ts
declare module "react-typewriter-effect" {
interface TypeWriterEffectProps {
text?: string;
multiText?: string[];
multiTextDelay?: number;
multiTextLoop?: boolean;
typeSpeed?: number;
startDelay?: number;
hideCursorAfterText?: boolean;
cursorColor?: string;
textStyle?: React.CSSProperties;
scrollArea?: Element | Document | Window;
}
export default class TypeWriterEffect extends React.Component<
TypeWriterEffectProps,
any
> {}
}