-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Typescript: Migrate @storybook/polymer
#8102
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/storybook/monorepo/i8488gg8x |
@@ -10,7 +10,7 @@ export function webpack(config) { | |||
{ | |||
test: /\.html$/, | |||
use: [ | |||
...config.module.rules[0].use, | |||
...(config.module.rules[0].use as RuleSetUseItem[]), |
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.
tslint complained about the typing of use
. I had to cast it but it might be a bug
rules[0].use
can be
type RuleSetUse =
| RuleSetUseItem
| RuleSetUseItem[]
| ((data: any) => RuleSetUseItem | RuleSetUseItem[]);
or are we 100% certain it is always RuleSetUseItem[]
? Do we need to add a check here?
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.
We can't be not sure, we should probably check
I could use some help migrating the client |
# Conflicts: # app/polymer/package.json
@daKmoR would you possibly be able to help with this one? |
with then it would be import { TemplateResult } from 'lit-html';
export type StoryFnPolymerReturnType = string | Node | TemplateResult; it's actually also "wrong" in |
The property in the Angular component is lowercase. Without this change, the button example story wont work properly. (The button text isn't rendered)
- `@types/webpack-env` must be defined as `dependencies` in packages that export a type/function using typings from `@types/webpack-env` (it is often `NodeModule`). In that case `/// <reference types="webpack-env" />` is present in some files of the `dist` folder of the lib. Example: `lib/client-api`. - `@types/webpack-env` must be defined as `devDependencies` in packages that use its typings internally but does not expose anything related to it. Many addons need the type because they use `module.hot` function. Example: `addons/a11y` - `webpack-env` should be removed from "compilerOptions.types" key of `tsconfig.json` of packages that don't need it. I also bump `@types/webpack-env` to ^1.15.0 to have the same version all across the monorepo
Clean usage of `@types/webpack-env` dep in all packages
Next 6.0.0
Fixed Angular button example story
# Conflicts: # app/polymer/package.json
What I did
Issue #5030