Quiz · Annotations and type inference · lesson 5 of 9Quiz — when to write a typeWhen do you write an explicit type annotation instead of relying on inference?[A]Annotate every declaration: an inferred type is only a guess that the compiler drops after checking the file, so a variable without an annotation falls back to any and is no longer checked anywhere.[B]Annotate parameters, variables without a value and the result of a function other code calls: the first two give inference nothing to read, the result type pins a promise, and a variable with a value gets its type itself.[C]Never annotate anything: TypeScript infers each parameter type from the calls it finds across the whole program, so a parameter annotation only narrows what the function may accept and changes no check at all.[D]Annotate variables, never parameters: the compiler infers each parameter type from how the function body uses it, so an annotation there only fights that analysis and hides what the body really needs from the value it is given at the call.← BackParameters without typesNext →let, const and literal types