Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.0.3] LogMessage interface using Boolean vs boolean #33

Closed
prescience-data opened this issue Mar 19, 2022 · 1 comment · Fixed by #34
Closed

[2.0.3] LogMessage interface using Boolean vs boolean #33

prescience-data opened this issue Mar 19, 2022 · 1 comment · Fixed by #34
Labels

Comments

@prescience-data
Copy link

prescience-data commented Mar 19, 2022

Noticed this then when casting my own copy of the LogMessage and HooksOption 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 to boolean.

Because Boolean !== boolean, it causes:

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'.

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?

TerryMooreII added a commit that referenced this issue Mar 20, 2022
Summary:
Change from Boolean to boolean type
fixes #33

Semver: patch
TerryMooreII added a commit that referenced this issue Mar 21, 2022
Summary:
Change from Boolean to boolean type
fixes #33

Semver: patch
TerryMooreII added a commit that referenced this issue Mar 21, 2022
Summary:
Change from Boolean to boolean type
fixes #33

Semver: patch
TerryMooreII added a commit that referenced this issue Mar 21, 2022
Summary:
Change from Boolean to boolean type
fixes #33

Semver: patch
@logdnabot
Copy link
Member

🎉 This issue has been resolved in version 2.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants