3 Matching Annotations
- Oct 2019
-
www.typescriptlang.org www.typescriptlang.org
-
In TypeScript, we can also set a value that a parameter will be assigned if the user does not provide one, or if the user passes undefined in its place.
-
buildName(undefined, "Adams")
-
If a default-initialized parameter comes before a required parameter, users need to explicitly pass undefined to get the default initialized value.
-