Closed renato-bohler closed 4 months ago
Thanks, assertion functions did not exist when I wrote this. Will pick this up when I can 👍
Hey, thanks for the quick response. Love the plugin by the way!
I validated this change against a fairly big codebase, and everything worked as expected.
Description (What)
This PR adds support for assertion functions. Assertion functions are not available as arrow functions (see https://github.com/microsoft/TypeScript/issues/34523).
Fixes #22
Justification (Why)
Because we're not supposed to be converting assertion functions to arrow functions.
How Can This Be Tested?
yarn test
alwaysValid
(function foo(val: any): asserts val is string {}
) should pass on the test