image-js / image-js-typescript

Temporary repository to work on the migration of image-js to TypeScript
https://image-js.github.io/image-js-typescript/
MIT License
5 stars 5 forks source link

refactor: add additional error handling for sigma option and a test case #382

Closed EscapedGibbon closed 1 year ago

EscapedGibbon commented 1 year ago

close: https://github.com/image-js/image-js-typescript/issues/326

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (198d72f) 98.64% compared to head (80f0af8) 98.64%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #382 +/- ## ======================================= Coverage 98.64% 98.64% ======================================= Files 222 222 Lines 5739 5741 +2 Branches 1215 1216 +1 ======================================= + Hits 5661 5663 +2 Misses 75 75 Partials 3 3 ``` | [Files Changed](https://app.codecov.io/gh/image-js/image-js-typescript/pull/382?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=image-js) | Coverage Δ | | |---|---|---| | [src/filters/gaussianBlur.ts](https://app.codecov.io/gh/image-js/image-js-typescript/pull/382?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=image-js#diff-c3JjL2ZpbHRlcnMvZ2F1c3NpYW5CbHVyLnRz) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

stropitek commented 1 year ago

The issue is not about changing the types. The types are correct AFAIK.

The issue is about what happens if the type error is ignored and js code gets executed anyway.

You should add a test that has a @ts-expect-error