Closed milahu closed 3 years ago
Right now the library doesn't do exhaustive type checks on arguments. To prevent these kinds of bugs, it may be better to use a tool like TypeScript or flow to check the code (they cost 0 nanoseconds at runtime). I'll close this issue for now but we may revisit adding type checks on the boundaries in the future.
they cost 0 nanoseconds at runtime
unnecessary encoding + decoding of sourcemaps is expensive, much more than 2 ns
unnecessary encoding + decoding of sourcemaps is expensive, much more than 2 ns
Definitely! I think a feature request with specific scenarios/test cases where source maps are encoded and/or decoded unnecessarily (and if possible the performance impact) could be very interesting. But I don't think adding the assertion for string would be the solution (and likely also not accepting arrays with numbers directly).
SMC fails on decoded mappings
error is
this should not hurt, no? the test costs 2 nanoseconds on my old laptop