probil / vue-socket.io-extended

:v::zap: Socket.io bindings for Vue.js and Vuex (inspired by Vue-Socket.io)
MIT License
628 stars 38 forks source link

Fix types definition for decorator #529

Closed jnt0r closed 3 years ago

jnt0r commented 3 years ago

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.

https://github.com/probil/vue-socket.io-extended/issues/489#issuecomment-839978807

codecov[bot] commented 3 years ago

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 commented 3 years ago

Also fixed the import in the README

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 5.0.0-alpha.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: