The TypeScript datatyping support not only applies to simple variables, it also supports you when doing clever things with functions. Specifically, TypeScript ensures you create reliable code when ...
To provide a function that implements that declaration, just use the equals sign to assign a function to the variable. This example sets the FirstNameTyped variable to a function compatible with ...