Closed Ibrahimmushtaq98 closed 2 months ago
Hi there, thanks for your thoughts on this. I'm not familiar with Vue myself, so I'm very open to ideas/feedback on the setup BUT the existing directory structure was chosen because it replicates the React directory structure, and the reason for that particular organisation was precisely to get the correct module names in the (react) typescript definition file. You can see how the react TS definition file is generated using this tsconfig file - specifically setting the root to the react/src directory, which means the module names are relative to that dir e.g. "intl-tel-input/react", "intl-tel-input/data" etc, which then matches how people import these modules (e.g. import IntlTelInput from "intl-tel-input/react"
), so the types get automatically loaded and applied correctly.
Hi there, so i am completely opposite which is I do not know much about react so I am also open to feedback. But i did try to refer to the react structure. I will say, i think i was blind cause I did not see the tsconfig file in there to fully refer to. I will also say that im no expert in Vue so I also could be wrong with the structure change.
The reason why i did so was to separate both typescript and javascript module that get imported BUT i think i can do away with this
Thanks for the feedback
Currently the structure of the Vue components feels a bit awkward to work on when trying to implement a typescript vue definition. So instead, I refactored the structure of the JavaScript related file for better organization and maintainability
Key Changes:
Hopefully with these changes, it would also allows others or myself to start making Typescript vue components
Please ask question if there are any doubts!