Closed fixplz closed 9 years ago
@phpnode Do you want to merge this? I'm not going to fix the errors now. Here is the error list https://travis-ci.org/codemix/babel-plugin-typecheck/jobs/85705961
I removed the try/catch in the traverse call so it shows error locations inside functions (like when augmenting variables). Is that ok? Maybe there's a better way to distinguish which errors should appear at the function node.
@fixplz added a few notes, I think we should revert a couple of things in the last PR. As a rule I want this plugin to be complementary to flow, so if flow supports something that we don't, then we should do the best job we can under the circumstances, but not prevent the programmer from using those constructs. Flow covers things that we cannot, and we cover things that flow doesn't support yet, so they can work well together provided that they don't step on each other's toes.
@phpnode just rebased
@fixplz ah I just merged #33 which incorporates your original commits
Consider reversing it, this PR will be cleaner.
@fixplz I'm not a huge fan of rebase for reasons like this, I'd rather leave the history intact even if it's messy.
@phpnode Ok. I will follow up about the issue of throwing errors for things like type parameters.
Fixed some mistakes I made with variables.
Changed
Object
annotation to error fornull
(Flow does this).Added some failing tests.