JamesHenry / typescript-estree

:sparkles: A parser that converts TypeScript source code into an ESTree-compatible form
https://jameshenry.blog
Other
84 stars 13 forks source link

feat(diagnostics): report on TS 1049, TS 1211 and TS 2364 #95

Closed JamesHenry closed 5 years ago

JamesHenry commented 5 years ago

:tada: This PR is included in version 13.3.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

j-f1 commented 5 years ago

Do you want to switch this to Array.includes for clarity? Or are you planning to add more logic to some cases?

armano2 commented 5 years ago

@j-f1 its good point, if we are not planning to add extra conditions there, we should go for includes, it has better performance.

https://jsperf.com/indexof-vs-switch-vs-includes

j-f1 commented 5 years ago

Oh wow switch is much faster

armano2 commented 5 years ago

did you tested it on chrome? -> we are targeting v8 (node) and includes is faster there due to optimization

image

j-f1 commented 5 years ago

I did a test on Safari, so no. I did make another suite with a bunch more options. Is one of those even faster?

armano2 commented 5 years ago

image not really includes is fastest 👍

j-f1 commented 5 years ago

Cool 😎