Closed viacheslaff closed 6 years ago
Merging #416 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #416 +/- ##
=======================================
Coverage 97.74% 97.74%
=======================================
Files 111 111
Lines 4251 4251
=======================================
Hits 4155 4155
Misses 96 96
Impacted Files | Coverage Δ | |
---|---|---|
packages/frint/src/App.spec.ts | 100% <100%> (ø) |
:arrow_up: |
packages/frint/src/App.ts | 99.35% <100%> (ø) |
:arrow_up: |
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 8f412ae...532158e. Read the comment docs.
Following suggestion by @markvincze, I've changed Container.get() signature from
get(name: string): any;
toget<T>(name: string): T;
.This not only allows to leverage type safety of TypeScript, but requires to use it.
Previously Container type was optional
Now if you don't specify
<Console>
it'll default to{}
(empty object type) andconsole.log()
won't compile. This is not ideal but unfortunately I don't know the way to require generic type in TS. Nevertheless it achieves the goal of making type required, because without using the type you pretty much cannot use the value received from the container.