frintjs / frint

Modular JavaScript framework for building scalable and reactive applications
https://frint.js.org/
MIT License
756 stars 37 forks source link

frint-di: Fix Container.get() return type #414

Closed viacheslaff closed 6 years ago

viacheslaff commented 6 years ago

In practice Container.get() returns instance of a provider, which can be anything.

Provider interface is a definition of provider, not instance. Therefore typing was incorrect.

Make options optional in createContainer() definition

fahad19 commented 6 years ago

may be a good time to make options (second argument of createContainer) optional too in typings.

viacheslaff commented 6 years ago

@fahad19, made options optional in createContainer() definition

fahad19 commented 6 years ago

thanks!

not your doing in this PR, but the build is failing because of some linting issues:


/home/travis/build/frintjs/frint/packages/frint-react/src/components/observe.js
  7:28  error  Unable to resolve path to module 'frint-component-handlers/lib/ObserveHandler'  import/no-unresolved
  7:28  error  Missing file extension for "frint-component-handlers/lib/ObserveHandler"        import/extensions

/home/travis/build/frintjs/frint/packages/frint-react/src/components/Region.js
  6:27  error  Unable to resolve path to module 'frint-component-handlers/lib/RegionHandler'  import/no-unresolved
  6:27  error  Missing file extension for "frint-component-handlers/lib/RegionHandler"        import/extensions

/home/travis/build/frintjs/frint/packages/frint-react/src/services/Region.js
  1:27  error  Unable to resolve path to module 'frint-component-handlers/lib/RegionService'  import/no-unresolved
  1:27  error  Missing file extension for "frint-component-handlers/lib/RegionService"        import/extensions
codecov[bot] commented 6 years ago

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #414   +/-   ##
=======================================
  Coverage   97.74%   97.74%           
=======================================
  Files         111      111           
  Lines        4251     4251           
=======================================
  Hits         4155     4155           
  Misses         96       96
Impacted Files Coverage Δ
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 eb28525...17ba728. Read the comment docs.

viacheslaff commented 6 years ago

@markvincze, could you please take a look if these changes make sense to you as you were the one who ported Frint to TypeScript?