This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 143
Add Type Checking API #230
Open
MisterUncloaked
wants to merge
16
commits into
Roblox:master
Choose a base branch
from
MisterUncloaked:type-checking-api
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Added a public API for type checking in Roact - Added nameOf function to Type to lookup the string name for any Type - Added TypeMirror module which exposes a subset of types in Type without exposing the internal Roact symbols - Added Roact.Type and Roact.typeOf to expose a type checking API for external use
MisterUncloaked
requested review from
LPGhatguy,
ZoteTheMighty and
jeparlefrancais
August 9, 2019 17:48
LPGhatguy
reviewed
Aug 9, 2019
LPGhatguy
suggested changes
Aug 9, 2019
- removed userdata dance in TypeMirror.lua - removed redundant checks in TypeMirror.lua - removed redundant declaration of allowed Roact types
…o be passed to Roact.createElement
MisterUncloaked
commented
Aug 10, 2019
This PR is ready for another pass - tests and docs are updated with Roact.isComponent (formerly Roact.isValidElementType) |
This PR should be ready to go at this point. |
jeparlefrancais
approved these changes
Aug 19, 2019
LPGhatguy
suggested changes
Aug 19, 2019
- removed Without Type Checking example that used undocumented internals - removed info blurb about only accepting component classes for additional safety
@LPGhatguy anything else you'd like to see here before we get this merged? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #227
Added a public API for type checking in Roact
Checklist before submitting:
CHANGELOG.md