fix: Make cacheErrors option optional (#616)

Set a default value of false and update the property to note that it
will now always be a boolean
This commit is contained in:
Ben Scott 2018-07-09 14:57:01 -07:00 committed by Brandon Keepers
parent b32fc2b38d
commit c275173ce3
1 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ export class Application {
public app: () => string
public cache: Cache
public router: express.Router
public catchErrors?: boolean
public catchErrors: boolean
public log: LoggerWithTarget
constructor (options?: Options) {
@ -31,7 +31,7 @@ export class Application {
this.log = wrapLogger(logger, logger)
this.app = opts.app
this.cache = opts.cache
this.catchErrors = opts.catchErrors
this.catchErrors = opts.catchErrors || false
this.router = opts.router || express.Router() // you can do this?
}
@ -222,5 +222,5 @@ export interface Options {
app: () => string
cache: Cache
router?: express.Router
catchErrors: boolean
catchErrors?: boolean
}