Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Object and .object are too similar #40

Closed
dcousens opened this issue Oct 2, 2016 · 3 comments
Closed

.Object and .object are too similar #40

dcousens opened this issue Oct 2, 2016 · 3 comments
Assignees
Labels

Comments

@dcousens
Copy link
Owner

dcousens commented Oct 2, 2016

Thankfully, the consequences are typically immediately obvious due to value types, but, still.

@dcousens dcousens added the bug label Oct 2, 2016
@dcousens dcousens self-assigned this Oct 2, 2016
@dcousens
Copy link
Owner Author

dcousens commented Oct 2, 2016

Perhaps .object should be removed from the API... pre-compilation is almost always advised anyway and .object prevents that.

@dcousens
Copy link
Owner Author

dcousens commented Oct 2, 2016

Removed it.

This is a breaking change, and the implications of using it directly are really bad due to it not using compiled types internally.
This lead to weird behaviour with strict flags on since you couldn't handle undefined values where it was expecting a type function.

Going to release a patch.

For anyone that sees this thread, you should be using typeforce.compile, not typeforce.object.

@dcousens
Copy link
Owner Author

dcousens commented Oct 2, 2016

Or not, actually, breaking changes are never OK.
Resolved the issue with ebf68d9#diff-168726dbe96b3ce427e7fedce31bb0bcR86 by compiling inline with the type rather than special casing it in compile... just like all the others do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant