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

typecheck argument in _set when in dev mode #343

Merged
merged 1 commit into from
Mar 6, 2017

Conversation

Conduitry
Copy link
Member

Fixes #342. I'm not entirely thrilled with the wording of this error message.

Putting this check in ._set as opposed to in .set seemed to be the most straightforward, as there's not really a good mechanism for having different versions of the helper functions themselves in dev vs regular mode.

@Rich-Harris Rich-Harris merged commit a463085 into master Mar 6, 2017
@Rich-Harris Rich-Harris deleted the gh-342-typecheck-set-argument-in-dev-mode branch March 6, 2017 20:57
@Rich-Harris
Copy link
Member

LGTM. Longer term I think we can make a case for having nice descriptive errors, with things like URLs and code samples, like this:

screen shot 2017-03-06 at 3 59 54 pm

@Ryuno-Ki
Copy link

Ryuno-Ki commented Mar 7, 2017

If you go the URL route, please don't append a serialised stack track like Angular 1.x does. It's really unreadable in DevTools. Maybe rather following RequireJS way of doing it.

@Rich-Harris
Copy link
Member

@Ryuno-Ki not sure what you mean, can you provide examples/screenshots? thanks

@Ryuno-Ki
Copy link

Ryuno-Ki commented Mar 7, 2017

https://stackoverflow.com/q/22287269

Links to error.angularjs.org (I'm on mobile right now).

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

Successfully merging this pull request may close these issues.

3 participants