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

fix: typings in dist #99

Merged
merged 6 commits into from
Aug 17, 2018
Merged

fix: typings in dist #99

merged 6 commits into from
Aug 17, 2018

Conversation

kuzhelov
Copy link
Contributor

@kuzhelov kuzhelov commented Aug 16, 2018

Proposed solution to fix #87.

The idea, essentially, is to replace inlined imports with absolute typing file path on its relative analog (the one that we would like to obtain from TS compiler but cannot do that) - during build process as separate stage added into gulp's pipeline.

Benefits

We won't need to require devs to do this unintuitive hack anymore to circumvent problem of TS transpiling

public static defaultProps = {
    ...
    // without explicit 'as' cast to DefaultBehavior's type (!!) this will introduce aforementioned problem for generated TS definitions
    accessibility: DefaultBehavior as Accessibility,
}

Design priorities

  • being easily removable (in case if better fix will be introduced)
  • affect only those parts that we pretty sure are problematic
  • introduce robust logic

@codecov
Copy link

codecov bot commented Aug 16, 2018

Codecov Report

Merging #99 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #99   +/-   ##
=======================================
  Coverage   86.05%   86.05%           
=======================================
  Files          39       39           
  Lines         667      667           
  Branches       93      102    +9     
=======================================
  Hits          574      574           
  Misses         90       90           
  Partials        3        3
Impacted Files Coverage Δ
src/components/Provider/ProviderConsumer.tsx 100% <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 a450551...1d67f07. Read the comment docs.

@kuzhelov kuzhelov changed the title fix: typings in dist [WIP] fix: typings in dist Aug 16, 2018
@kuzhelov kuzhelov changed the title [WIP] fix: typings in dist fix: typings in dist Aug 16, 2018
@kuzhelov kuzhelov merged commit 321d5f7 into master Aug 17, 2018
@kuzhelov kuzhelov deleted the fix/ts-inlined-typing-imports branch August 29, 2018 21:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typings in dist are incorrect
4 participants