import { IncomingHttpHeaders as CoreIncomingHttpHeaders } from "http"; import { expectAssignable, expectNotAssignable } from "tsd"; import { IncomingHttpHeaders } from "../../types/header"; const headers = { authorization: undefined, ["content-type"]: "application/json", } satisfies CoreIncomingHttpHeaders; expectAssignable(headers); // It is why we do not need to add ` | null` to `IncomingHttpHeaders`: expectNotAssignable({ authorization: null, ["content-type"]: "application/json", });