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 the error on index.ts and do the necessary convertions #801

Closed
wants to merge 1 commit into from
Closed

typecheck the error on index.ts and do the necessary convertions #801

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jun 26, 2018

My proposal to fix #792

@johnnyreilly
Copy link
Member

Interesting - could you elaborate on what you feel the advantage of this approach is over #792 please?

@ghost
Copy link
Author

ghost commented Jun 26, 2018

It will print something meaningful even if ts-loader catch’s a strange object as an error. I think that we can’t really trust on the error shape because some plugin might be messing things around. It will also keep the existing behavior for the expected error objects.

@johnnyreilly
Copy link
Member

johnnyreilly commented Jun 26, 2018

I'm not sure if I want to go to this level of error interrogation or not. I need to think about it a little.

@linxiaowu66 do you have a view on this? Your approach is simpler which is initially appealing to me. Would this PR deal with your concerns? Does it have any advantages / disadvantages that you're aware of?

@ghost
Copy link
Author

ghost commented Jun 26, 2018

@johnnyreilly sure :), both options do the job, I was just guessing if it broke once due to receiving some unexpected shape it might break again on something similar

@johnnyreilly
Copy link
Member

Thanks @systemmetaphor - I'll have a think. I'm going to go with one of these approaches. Just need to decide which 😄

@johnnyreilly
Copy link
Member

Thanks for your efforts @systemmetaphor. I've decided to go with the initial PR for simplicities sake. I hope that's okay with you - and even though your PR hasn't landed I hope you understand why and aren't too discouraged! Much ❤️

@ghost
Copy link
Author

ghost commented Jun 27, 2018

:) no problem

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.

None yet

2 participants