TS2322: Type 'LogHooksOption' is not assignable to type 'HooksOption'.
Types of property 'beforeSend' are incompatible.
...
Types of property 'disableStacktrace' are incompatible.
Type 'Boolean | undefined' is not assignable to type 'boolean | undefined'.
Type 'Boolean' is not assignable to type 'boolean | undefined'.
Noticed this then when casting my own copy of the
LogMessage
andHooksOption
type until exported.https://github.com/logdna/logdna-browser/blob/v2.0.3/src/logdna.d.ts#L65
When using @typescript-eslint/ban-types linting rule, the linter autofixes
Boolean
toboolean
.Because
Boolean !== boolean
, it causes:Normally I would assume this is developer preference, but I note that all the historic types are cast as primitives eg https://github.com/logdna/logdna-browser/blob/v2.0.3/src/logdna.d.ts#L37 so I imagine this inconsistency was possibly due to linting not running in CI etc?