jorgebucaran / classcat

Build a class attribute string quickly
MIT License
905 stars 22 forks source link

Typing #4

Closed Swizz closed 6 years ago

Swizz commented 6 years ago

As we discussed on slack here is the DTS for class wrap. I committed each step of my "how to add a DTS to a project" flow.

As the PR will be squashed into one commit at the end.

I will remove the demo.ts file when we will be ready to merge.

Do I need to try to write some typing tests too ?

codecov-io commented 6 years ago

Codecov Report

Merging #4 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #4   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines          13     13           
  Branches        6      6           
=====================================
  Hits           13     13

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 2c49243...a4eb37f. Read the comment docs.

jorgebucaran commented 6 years ago

Looks awesome @Swizz! Thanks.

Now, how do we test this? πŸ˜„

jorgebucaran commented 6 years ago

@Swizz Do I need to try to write some typing tests too ?

I don't know how that would work, but yes please! πŸ™

Swizz commented 6 years ago

classwrap.d.ts(17,25): error TS7010: 'wrap', which lacks return-type annotation, implicitly has an 'any' return type.

jorgebucaran commented 6 years ago

@Swizz Move the DTD file inside src and make sure to run npm run format.

Also, would it be possible to run this without tsconfig.js, just curious. If it's possible, can you show me how it would be done? πŸ™

Swizz commented 6 years ago

The paths option doesnt have cli alternative. So it will be still necessary to keep the tsconfig.json for this one. I would prefer keep all the option on this file instead of moving all options inside the cli except the paths one.

jorgebucaran commented 6 years ago

@Swizz I would prefer keep all the option on this file instead of moving all options inside the cli except the paths one.

Yes, I can agree with that. πŸ‘

jorgebucaran commented 6 years ago

https://github.com/jbucaran/classwrap/commit/9e0ab6fa55d76c368c85af974f210961390476dc