Unable to import types
In my typescript project I am having issues importing types such as the BracketsViewer. It appears that this was completed according to https://github.com/Drarig29/brackets-viewer.js/issues/27 but I am using version 1.6.2 and I am unable to import the types.
I am not much of a typescript guru but I believe that either the tsconfig.json needs declaration set to true and/or the package.json needs to have the types property set. I am willing to look into this issue and make a fix if problem is not between chair and keyboard.
For more context I am able to import BracketsManager like so:
import { BracketsManager } from 'brackets-manager/dist'
But I cannot import BracketsViewer, I have tried the following:
import { BracketsViewer } from 'brackets-viewer/dist';
and the following as mentioned in https://github.com/Drarig29/brackets-viewer.js/issues/27
import { BracketsViewer } from 'brackets-viewer';
I get the following error: TS2307: (TS) Cannot find module 'brackets-viewer' or its corresponding type declarations.
Hello, have you find any solution?
Did you install brackets-viewer?
Did you install brackets-viewer?
Yes I'm still same...
What package manager are you using? And how are you importing the viewer?
What package manager are you using? And how are you importing the viewer?
Using yarn but I tried on npm too doesn't matter it's giving me to "that error.
import BracketsViewer from "brackets-viewer" //giving error
const BracketsViewer = require("brackets-viewer") // giving same error too
I'm having the same issue, I'm also using npm, did you find any soluition @atalayio / @NoahSurprenant ? @Drarig29 is dead the repo I guess? are you accepting prs / contributions?
I'm having the same issue, I'm also using npm, did you find any soluition @atalayio / @NoahSurprenant ? @Drarig29 is dead the repo I guess? are you accepting prs / contributions?
In my own project, I resorted to copying the types into their own file. But that is just a hack and ideally the types should be exported. I opened this PR https://github.com/Drarig29/brackets-viewer.js/pull/112 that I believe exports the type properly. But I am not a TypeScript expert nor am I a maintainer here.
I'm having the same issue, I'm also using npm, did you find any soluition @atalayio / @NoahSurprenant ? @Drarig29 is dead the repo I guess? are you accepting prs / contributions?
In my own project, I resorted to copying the types into their own file. But that is just a hack and ideally the types should be exported. I opened this PR #112 that I believe exports the type properly. But I am not a TypeScript expert nor am I a maintainer here.
got it, let's see if dragrig has any feedback on it, thanks!
Hey guys! Thanks @NoahSurprenant for your PR, sorry for not giving love to this project anymore ❤️
The changes are released in https://github.com/Drarig29/brackets-viewer.js/releases/tag/v1.7.0
The changes are released in https://github.com/Drarig29/brackets-viewer.js/releases/tag/v1.7.0
You already did a lot man! I hope I can contribute asap if I find anything helpful!
@joaquinjsb I just updated the docs with a lot of content. Hope it will help!
https://drarig29.github.io/brackets-docs/
@joaquinjsb I just updated the docs with a lot of content. Hope it will help!
https://drarig29.github.io/brackets-docs/
Just gave a look, a lot of things makes more sense now, thank you very much !