TS2724
'./index' has no exported member named 'HeaderOptions'. Did you mean 'HeaderOption'?
Broken Code ❌
export interface HeaderOption {
Authorization: string;
'Cache-Control': string;
}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:
import { HeaderOption } from './index';
export function printHeader(header: HeaderOption) {
console.log(header);
}