Skip to content

Conversation

@jiribenes
Copy link
Contributor

Most of the contents are scaffolding, what this really adds is:

  1. types in libraries/js/effekt_*.js using the JSDoc syntax
  2. a // @ts-check comment at the top of the file

This means that we get some light form of type checking when investigating the JS output in VSCode.
It's especially useful when writing FFI. :)

I have not tested this properly, I really only tried it on two examples.

To me, this is just a first step: the type annotations currently present are a combination of my own vibes and of Claude's ideas of what the types should be. There's also a lot of @ts-ignore comments and casts to any and similar things to make TS shut up, this could likely be much more improved, hence the draft status of this PR.

@jiribenes
Copy link
Contributor Author

There are still a few spurious errors like the following, but it seems that it works fine now:
image

@jiribenes
Copy link
Contributor Author

But the types propagate somewhat well if there aren't any local functions in the way -- this is from parsing_dollars:
image

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants