Skip to content

Instantly share code, notes, and snippets.

@fvilante
Created December 3, 2019 14:56
Show Gist options
  • Select an option

  • Save fvilante/7e5b468b77e21fdc811969b2020ef131 to your computer and use it in GitHub Desktop.

Select an option

Save fvilante/7e5b468b77e21fdc811969b2020ef131 to your computer and use it in GitHub Desktop.
Can Typescript perform run-time check at compile-time ?
// Here we will put the solution.
// But before let's have a talk bellow.
@fvilante

fvilante commented Dec 3, 2019 •

Copy link
Copy Markdown
Author

STUDY CASE 01 - CONCLUSION

Original answer:

Does Typescript type check in runtime ?

Response:

yes, in the sense that it avoids runtime checks bring the effect that they generate to static-time.

WHAT MORE ?

Can this technique be generalized ?

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