-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added type annotation to helpers, added ts declaration files for angu… #2459
Added type annotation to helpers, added ts declaration files for angu… #2459
Conversation
Codecov Report
@@ Coverage Diff @@
## release/3.3 #2459 +/- ##
============================================
Coverage 20.18% 20.18%
============================================
Files 398 398
Lines 8838 8838
Branches 940 952 +12
============================================
Hits 1784 1784
+ Misses 6358 6324 -34
- Partials 696 730 +34
Continue to review full report at Codecov.
|
Not sure if this is you or on master but it looks like the tests are broken:
@ndelangen who can review these angular PRs? there's a few of these just sitting around now |
@danielduan I think it is some npm packages conflict in parent branch: https://stackoverflow.com/questions/44656265/export-%C9%B5cmf-was-not-found-in-angular-core |
FYI: test passes on upstream branch: https://circleci.com/gh/storybooks/storybook/24979 |
Here it fails because of errors not warnings:
|
@@ -0,0 +1,28 @@ | |||
export interface IStorybookStory { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also have type definitions in the @types/...
npm organisation.
Should we move these here? Or add them there also?
Are these even the same type of definitions?
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find any typings for apps at https://microsoft.github.io/TypeSearch/, only for addons.
I think app and type definitioins for it should be in same package, at least written with typescript like angular. It's not the same typings.
@alterx do you want to approve and merge this? |
@ndelangen lets wait until we approve and merge #2467 |
Seems like the CLI tests are breaking over this:
|
@ndelangen @alterx I fixed conflicts, but i think we should enable "noImplicitAny" flag in tsconfig, because without it typescript is useless, and we will get broken typings after each merge. |
Yeah, I agree. If we're going to have type definitions we need to enforce its use. |
👏 |
Issue:
Modules "storybook/angular" and "storybook/anguar/demo" has no type declaration files and
angular helpers has no proper typings. ts-loader throws many errors with "noExplicitAny" flag enabled. Issue
What I did
Added type declaration fles for "storybook/angular" and "storybook/anguar/demo" modules. Annotated angular helpers functions
How to test
Set "noExplicitAny": true in tsconfig.json
Is this testable with jest or storyshots?
no
Does this need a new example in the kitchen sink apps?
no
Does this need an update to the documentation?
no