Closed MartinTichovsky closed 5 years ago
+1 Can we get a resolution to this?
Yes, create file like modules.d.ts anywhere and put this
declare module "react-string-replace" {
function reactStringReplace(
text: React.ReactNode,
regex: RegExp,
cb: (match: string, index: number) => string | JSX.Element,
): JSX.Element;
export default reactStringReplace;
}
Types were already added in 6c71cd4, although if they are incomplete I'd welcome another PR. Just publish a new version to NPM, 0.4.2.
Please reopen if this is not resolved!
Hi, I have downloaded v0.4.2 and it doesn't have any index.d.ts. Did you already include this file?
Ah I forgot to add it to files
in package.json. My bad, thanks for the follow up. Published 0.4.3.
When i install trought npm install react-string-replace, in source code isn't index.d.ts file and npm install @types/react-string-replace doesn't working.