Explore Library
Code QuizIntermediate

Using unknown Without Narrowing

An unknown value is used directly without a type guard.

Codetypescript
function format(data: unknown) {
  return data.toFixed(2);
}

What is the bug in this code?