Draft
Conversation
Closed
`~` is expanded by the shell before being passed to the program.
Programs don't need to re implement this. Compare:
> file ~/.profile
/home/fredefox/.profile: ASCII text
> file "~/.profile"
~/.profile: cannot open `~/.profile' (No such file or directory)
You can test what something expands to with `echo`:
> echo ~/.profile
/home/fredefox/.profile
dda037c to
45415f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This isn't really in a usable state, but my thought was that it should
not be necessary to try and re-implement the AST of TypeScript types.
In stead we should be able to pull out the representation as defined
by the
typescript/libmodule (whichts-morphwraps). Now,unfortunately
ts-morphis infected with OOP and so the structuresare circular and cannot directly be serialized. So a little logic
is required to flatten the data.[see footnote 1] This is what I've tried to do.
My implementation uses unsafe coercions in two places. I'm not very
happy with this.
Below is an example of how the exported representation will differ
with this patch. Note that this will break your Haskell package
which is not expecting this structure.
One things that would need a bit of extra work is to convert the
returnTypefield into something more structured. Really it's aTypenode and does have a well-defined structure - but for somereason when it's converted to JSON only a string representation is
output.
Before:
After:
[1]: Alternatively some function that I have yet to find allows for exporting the structure whole-sale.