Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX beta] fix for TS 5.1 nightly narrowing change
The type here was `any` and *sort of* narrowing before; now it checks explicitly whether it is `string`. TS 5.1 seems to have a change (maybe a regression?) in how it narrows between the two branches, but previous versions simply fell back to `any` anyway rather than narrowing to the inferred types. This unblocks us for TS 5.1, but we should also rewrite this function handler entirely: if it were just two functions instead of using variadic function args, it would dramatically simplify *all* of this implementation (and almost certainly perform better, too!).
- Loading branch information