typescript 22variable 3f 3a type 22 notation

Solutions on MaxInterview for typescript 22variable 3f 3a type 22 notation by the best coders in the world

showing results for - "typescript 22variable 3f 3a type 22 notation"
Daniele
03 Aug 2019
1// the "last" property is optional and can be undefined
2function printName(obj: { first: string; last?: string }) {  // ...}// Both OKprintName({ first: "Bob" });printName({ first: "Alice", last: "Alisson" });Try
Ariana
05 Aug 2018
1// Writing ! after any expression is effectively a type assertion 
2// that the value isn’t null or undefined
3function liveDangerously(x?: number | null) {  // No error  console.log(x!.toFixed());}Try