Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

fix(typings): import in d.ts files#76

Merged
levithomason merged 4 commits intomasterfrom
fix/fix-typings
Aug 13, 2018
Merged

fix(typings): import in d.ts files#76
levithomason merged 4 commits intomasterfrom
fix/fix-typings

Conversation

@smykhailov
Copy link
Collaborator

Generated definition files (d.ts) contain an incorrect path to import some of the types if they are used implicitly on static properties. To avoid this, we have to declare types explicitly.
This PR adds the types explicitly.

@kuzhelov kuzhelov changed the title Fixed typings import in d.ts files fix(typings): import in d.ts files Aug 9, 2018
@codecov
Copy link

codecov bot commented Aug 9, 2018

Codecov Report

Merging #76 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #76   +/-   ##
=======================================
  Coverage   86.29%   86.29%           
=======================================
  Files          39       39           
  Lines         664      664           
  Branches       90       99    +9     
=======================================
  Hits          573      573           
  Misses         88       88           
  Partials        3        3
Impacted Files Coverage Δ
src/components/Button/Button.tsx 81.08% <ø> (ø) ⬆️
src/components/Accordion/Accordion.tsx 66% <ø> (ø) ⬆️
src/components/Image/Image.tsx 100% <ø> (ø) ⬆️
src/components/Menu/MenuItem.tsx 100% <ø> (ø) ⬆️
src/components/List/List.tsx 100% <ø> (ø) ⬆️
src/components/List/ListItem.tsx 82.35% <ø> (ø) ⬆️
src/components/Menu/Menu.tsx 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2914943...9dabff5. Read the comment docs.

@levithomason
Copy link
Member

Heads up, I've merged master and fixed conflicts here for you

| undefined

export type ComponentPartStyle = ComponentPartStyleFunction | ICSSInJSStyle
export type ComponentPartStyle = ComponentPartStyleFunction | ICSSInJSStyle | undefined
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still not sure this is required. This doesn't exist on master yet typings compile, tests pass, and all functionality is working.

Could you recap why we need this again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whenever you have compiler option "strictNullChecks": true, then it will complain.
This happens only because there is an indexed property defined together with optional. If you use one of them it is fine even with the compiler option enabled

image

@levithomason
Copy link
Member

Approved, merged master, added changelog entry.

@levithomason levithomason merged commit a31f7e3 into master Aug 13, 2018
@levithomason levithomason deleted the fix/fix-typings branch August 13, 2018 18:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants