TS2724

'./index' has no exported member named 'HeaderOptions'. Did you mean 'HeaderOption'?

Broken Code ❌

index.ts
export interface HeaderOption {
  Authorization: string;
  'Cache-Control': string;
}
printHeader.ts
import { HeaderOptions } from './index';
 
export function printHeader(header: HeaderOptions) {
  console.log(header);
}

Fixed Code ✔️

TypeScript noticed a typing error in the name of the imported interface. The code will work if we correct the typo:

printHeader.ts
import { HeaderOption } from './index';
 
export function printHeader(header: HeaderOption) {
  console.log(header);
}