Skip to content

Fix types definition for decorator #529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2021
Merged

Fix types definition for decorator #529

merged 2 commits into from
May 14, 2021

Conversation

jnt0r
Copy link
Contributor

@jnt0r jnt0r commented May 13, 2021

I noticed that the types definition for the decorator were not changed when the decorator was excluded from the index file. So I removed the export of Socket from index and moved it to another definition file.
With this article, I figured out how to provide the definition file for the submodule: https://dev.to/binjospookie/exports-in-package-json-1fl2

Before this, I was not able to use Socket with TypeScript. The Import import Socket from 'vue-socket.io-extended/decorator'; was not working and IDE mentioned that there was no module found named vue-socket.io-extended/decorator.
The change to package.json was needed because IDE would mention to use import import Socket from 'vue-socket.io-extended/types/decorator'; which is working in IDE but not when compiling as the JS import is wrong.

#489 (comment)

@codecov
Copy link

codecov bot commented May 13, 2021

Codecov Report

Merging #529 (136277c) into alpha (05620af) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             alpha      #529   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          127       127           
  Branches        21        21           
=========================================
  Hits           127       127           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 05620af...136277c. Read the comment docs.

@jnt0r
Copy link
Contributor Author

jnt0r commented May 13, 2021

Also fixed the import in the README

@probil probil merged commit bff1318 into probil:alpha May 14, 2021
@github-actions
Copy link

🎉 This PR is included in version 5.0.0-alpha.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants