Closed dylannirvana closed 3 years ago
The error completely breaks the site
Your using typescript, this package has no typescript definitions. Your can define them yourself if you require them.
I'm no longer maintaining this repo.
This was my solution to this issue:
react-script-tag.d.ts
type ScriptTagProps = JSX.IntrinsicElements['script']
interface ReactScriptTagProps extends ScriptTagProps {
/**
* True if the <ScriptTag> is being hydrated on the client, otherwise false.
*/
isHydrating?: boolean
}
declare module 'react-script-tag' {
const content: React.FC<ReactScriptTagProps>
export default content
}
Attempting a pretty simple usage after npm i --save react-script-tag
I am getting this error:
_Could not find a declaration file for module 'react-script-tag'. '/Users/dylannirvana/Documents/website/dylannirvana/client/nodemodules/react-script-tag/lib/index.js' implicitly has an 'any' type. Try
npm i --save-dev @types/react-script-tag
if it exists or add a new declaration (.d.ts) file containingdeclare module 'react-script-tag';
ts(7016)