Created
July 12, 2019 19:38
-
-
Save krisselden/c49f8180dce81a10ecf453b8f3d29680 to your computer and use it in GitHub Desktop.
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
// Monomorphic wrapper for polymorphic value | |
wrapper = { | |
type, | |
value | |
} | |
// CheckMap wrapper for .type lookup monomorphic | |
if (wrapper.type === 1) { | |
// CheckMap value for .somefield lookup monomorphic because in branch for one type | |
wrapper.value.somefield | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment