you saw how to use type annotations to annotate values of variables. Now, you’ll see how to do the same with function parameters and return types and why that can be useful.
When you first write a function in TypeScript, you might see red squiggly or dotted lines under the code. These lines indicate that TypeScript has detected an issue or missing type information. It’s TypeScript’s way of warning you that something needs to be fixed or clarified, such as missing return types, parameter types, or incorrect usage.
function incomingCall(num) {}

When TypeScript complains that a parameter "implicitly has an 'any' type", you have three options to fix it:
function incomingCall(name: any) {
console.log(`Name: ${name}`);
}





function incomingCall(name: string) {
console.log(`Name: ${name}`);
}
incomingCall("chai");
TypeScript helps prevent bugs early by checking if you're using the right methods for the right data types.
It’s like having a smart assistant that stops you from making silly mistakes before they become runtime errors.
Function parameter annotations in TypeScript are used to specify the expected types of the parameters that a function takes.
// Regular Func
function incomingCall(num: number) {
return num + 1;
}
const callsReceived = incomingCall(2);
console.log(callsReceived);
// Arrow Func Annotations
const outgoingCall = (a: number, b: number) => a * b;
const callsDialed = outgoingCall(2, 1);
console.log(callsDialed);
If you try to pass more arguments than what is specified in the function parameters,
TypeScript will throw an error because it strictly checks the number and types of arguments a function expects.