Explore Library
Code QuizBeginner

Function Assigned to a Typed Variable

A function assigned to a typed variable declares an incompatible parameter type.

Codetypescript
type Logger = (message: string) => void;

const log: Logger = (message: number) => {
  console.log(message);
};

What is the bug in this assignment?