Skip to content
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

Typescript Typings #17

Merged
merged 3 commits into from
Apr 7, 2019
Merged

Typescript Typings #17

merged 3 commits into from
Apr 7, 2019

Conversation

alixaxel
Copy link
Contributor

Closes #16

@codecov
Copy link

codecov bot commented Mar 16, 2019

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #17   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines         196    196           
  Branches       55     55           
=====================================
  Hits          196    196

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 d74a30f...a870a92. Read the comment docs.

@codecov
Copy link

codecov bot commented Mar 16, 2019

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #17   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines         196    196           
  Branches       55     55           
=====================================
  Hits          196    196

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 d74a30f...0a667f6. Read the comment docs.

@fent
Copy link
Owner

fent commented Mar 18, 2019

Looks good, would prefer if the file was placed in a typings folder to keep things more organized.

In another topic slightly related to types but not to this PR, looking over the API, I feel like having both options and stack for ROOT and GROUP types is a bit confusing. Maybe we should only have one of them, and if the group doesn't have a pipe, then the field is still an array of array of tokens, but the array should contain only one list? What do you think?

@alixaxel
Copy link
Contributor Author

alixaxel commented Mar 18, 2019

@fent

Looks good, would prefer if the file was placed in a typings folder to keep things more organized.

Sure thing.

if the group doesn't have a pipe, then the field is still an array of array of tokens

I think it's a good decision. That's exactly what I do to simplify follow up code too.

  if (tokens.type === ret.types.ROOT || tokens.type === ret.types.GROUP) {
    if (tokens.hasOwnProperty('options') !== true) {
      tokens.options = [tokens.stack];
    }

Do you want the typings in to reflect this new 2-dimensional array stack?

@fent
Copy link
Owner

fent commented Mar 18, 2019

Do you want the typings in to reflect this new 2-dimensional array stack?

Well what I was planning to do was something like your code. Keep options and remove stack. Or actually, keep stack around for a short while to support backwards compatibility.

But anyway, I can make the change to typings when I make the code changes.

@alixaxel
Copy link
Contributor Author

@fent Just following up on this.

Do you want me to change this to the typings folder without the options/stack changes?

@fent
Copy link
Owner

fent commented Mar 30, 2019

Yep, I was waiting on that before reviewing

@alixaxel
Copy link
Contributor Author

@fent Ah, some misunderstanding on my part, just pushed it. 😄

@fent fent merged commit 6621c4d into fent:master Apr 7, 2019
@fent
Copy link
Owner

fent commented Apr 7, 2019

Thanks!

@alixaxel
Copy link
Contributor Author

alixaxel commented Apr 8, 2019

After deleting my local typings for ret and installing 0.3.0, it's no longer able to find the typings:

image

@alixaxel
Copy link
Contributor Author

alixaxel commented Apr 8, 2019

@fent While moving the typings into typings directory, I forgot to specify it should also be bundled with the package. 😕 Sorry about that! I submitted #19 to address this.

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

Successfully merging this pull request may close these issues.

2 participants