Spot the bug in the Session declaration

from Declaration files
TypeScript 6 intermediate 4 min 3 issues to find

Find where this generated declaration disagrees with the documented JavaScript behavior.

TypeScript
export interface Session {
  id: string;
  expiresAt: Date;
}

export declare function findSession(
  id: string,
): Session;

export declare function renewSession(
  id: string,
  seconds?: number,
): Session;

export declare const mode: "production";
Open in playground
Report an error