It is to mark the parameter as optional.
- TypeScript handbook https://www.typescriptlang.org/docs/handbook/2/functions.html#optional-parameters
- TypeScript Deep Dive https://basarat.gitbook.io/typescript/type-system/functions#optional-parameters
More Related Contents:
- ‘unknown’ vs. ‘any’
- *ngFor running an infinite loop in angular2
- get and set in TypeScript
- typescript interface require one of two properties to exist
- The property ‘value’ does not exist on value of type ‘HTMLElement’
- How to inject Document in service?
- How to exclude getter only properties from type in typescript
- In TypeScript, how to get the keys of an object type whose values are of a given type?
- Implementing a generic function with a conditional return type
- WARNING: sanitizing unsafe style value url
- Angular2: How to load data before rendering the component?
- How to define static property in TypeScript interface
- What is the difference between type and class in Typescript?
- TypeScript Import Path Alias
- Declaring the type of ‘this’ in a typescript function?
- Using eslint with typescript – Unable to resolve path to module
- Angular no provider for NameService
- Typescript error: TS7053 Element implicitly has an ‘any’ type
- TypeScript interface implementing doesn’t check method parameters
- In Typescript what does mean?
- Accessing a property in a parent Component
- TypeScript error in Angular2 code: Cannot find name ‘module’
- Is this behavior of “𝚊𝚗𝚢” a TypeScript Type System Bug?
- Class type check in TypeScript
- Typescript: Type of a property dependent on another property within the same object
- Naming of TypeScript’s union and intersection types
- Eliminate nevers to make union possible
- Union and Intersection of types
- What is the “as syntax” pointed out by tslint?
- Jest won’t transform the module – SyntaxError: Cannot use import statement outside a module