johannesjo / angular2-promise-buttons

Chilled loading buttons for angular2
https://johannesjo.github.io/angular2-promise-buttons/#demo
MIT License
86 stars 28 forks source link

Add type information for forRoot #13

Closed ghost closed 7 years ago

ghost commented 7 years ago

Enables IDE to suggest config properties, like this:

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-1.4%) to 94.309% when pulling 545ec223bd7250c128070d40d74e1e9843f300ea on maxkorz:feat-config-typings into 664927473fec9ba34b3636e8b40f5761f8f98d81 on johannesjo:master.

ghost commented 7 years ago

I wonder why did the coverage decreased? previous build: https://coveralls.io/builds/12425024/source?filename=src%2Fpromise-btn.directive.ts#L26 this build: https://coveralls.io/builds/12425546/source?filename=src%2Fpromise-btn.directive.ts#L26

what does Branches [[17, 1], [19, 1], [20, 1]] missed. mean and how do I test it?

johannesjo commented 7 years ago

That's a little weird indeed. Branches usually refer to lines having one or multiple logical or comparison operators in them, e.g.:

bla && bla();
// or
if (something === 'blue' || something === 'yellow') { ...

In order to get complete coverage on the branches you would need to test all possible values. I would expect that the compiled es2015 syntax has some lanes in them which are not covered.