react-audio-visualize
react-audio-visualize copied to clipboard
Export types from package.json
Fixes https://github.com/microsoft/TypeScript/issues/52363
@samhirtarif
Hello, is it possible for this pull request to be merged? It's not possible to import any of the components when using TypeScript and .tsx files without errors as it complains about the types.
here's a yarn patch you can use until the author gets back from spending all the internet credits.
diff --git a/package.json b/package.json
index 73d831ffb09522160101c69b8fab688823f1eaa7..10992633d9c992045756b455d249cf1bfd9015ea 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,8 @@
"exports": {
".": {
"import": "./dist/react-audio-visualize.es.js",
- "require": "./dist/react-audio-visualize.umd.js"
+ "require": "./dist/react-audio-visualize.umd.js",
+ "types": "./dist/index.d.ts"
}
},
"scripts": {
chuck it in .yarn/patches/react-audio-visualize-npm-1.1.3-4843f9e559.patch
then update your package.json with
...
"dependencies": {
...
"react-audio-visualize": "patch:react-audio-visualize@npm%3A1.1.3#~/.yarn/patches/react-audio-visualize-npm-1.1.3-4843f9e559.patch",
...
},
"resolutions": {
"react-audio-visualize@npm:^1.1.3": "patch:react-audio-visualize@npm%3A1.1.3#~/.yarn/patches/react-audio-visualize-npm-1.1.3-4843f9e559.patch"
}
...
👍🏻 🤝
@asquithea thanks for this!
And sorry for the wait guys! This will be published shortly!