Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Runtime type checking #30

Open
zoehneto opened this issue Mar 17, 2018 · 3 comments
Open

Runtime type checking #30

zoehneto opened this issue Mar 17, 2018 · 3 comments
Labels
discussion For direction and implementation discussions help wanted Extra attention is needed

Comments

@zoehneto
Copy link
Contributor

I'm not sure whether this is out of scope for this project, but I think it would be interesting to collect passed types even in places where type information is already supplied in the source code and then check whether the typings in the source code are actually correct.

@urish
Copy link
Collaborator

urish commented Mar 17, 2018

Sounds like an interesting direction - especially when working with server-side API for which the types have been specified manually. I'm keeping this open in case someone wants to take a stab at it.

@urish urish added the help wanted Extra attention is needed label Mar 17, 2018
@MadaraUchiha
Copy link
Contributor

What do we do in a case where the two don't match? Do we attempt to fix it, just emit a warning when running the fixes file? Emit a warning in runtime?

@MadaraUchiha MadaraUchiha added the discussion For direction and implementation discussions label Mar 17, 2018
@zoehneto
Copy link
Contributor Author

I think for developer convenience it would be nice if conflicting / non assignable types were added as a union type. That way one can use ones favorite vcs tool to compare all type changes. As a stretch goal it would obviously also be nice fo have some logging output which shows the type observed and the corresponding call stack so one can determine where it came from and if perhaps the caller is passing the wrong type. That said, I'm not aure whether this can be achieved without deeply integrating into the respective browsers developer tools.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion For direction and implementation discussions help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants