Open
Description
There appears to be an inconsistency in how tsc
and tsgo
handle the placement of @ts-expect-error
directives when dealing with TS2769
(No overload matches this call) errors.
import { reduce } from 'lodash';
export function foo(state: any) {
// tsc is happy with @ts-expect-error here
// @ts-expect-error FIXME (TS2769) No overload matches this call.; Remove this comment to see full error message
return reduce(
{ foo: 'bar' },
(fuzz: number) => {
return fuzz;
},
// tsgo is happy with @ts-expect-error here
{}
);
}
Repo to see the error with: https://github.com/cartond/tsgo-ts-expect-err-repro