You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Interface only has a call signature, you should use a function type instead. eslint(@typescript-eslint/prefer-function-type)interfaceresultFunction<TOut,TIn>{(_: TIn): TOut;}interfaceContentGetter<TRow>{(row: TRow): Content<TRow>;}// Type can be declared using an interface. eslint (etc/prefer-interface)typeresultFunction<TOut,TIn>=(_: TIn)=>TOut;typeContentGetter<TRow>=(row: TRow)=>Content<TRow>;
The text was updated successfully, but these errors were encountered:
Some time after this rule was written, Anders Hejlsberg opened a PR that preserves type aliases for union and intersection types. That PR's changes should included in TypeScript 4.2, so when that version is released, the reasons for preferring interfaces might be less compelling.
The text was updated successfully, but these errors were encountered: