Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marionette: migrate to TS #13448

Merged
merged 1 commit into from Jan 13, 2021
Merged

Marionette: migrate to TS #13448

merged 1 commit into from Jan 13, 2021

Conversation

gaetanmaisse
Copy link
Member

Issue: Part of #5030

What I did

Fastly migrate @storybook/marionette to TS as I want to close the big TS Migration Issue before moving to improve types of @storybook/core.

How to test

  • CI should be 馃煝 , we rely only on examples as there is no E2E for Marionette.

@gaetanmaisse gaetanmaisse added maintenance User-facing maintenance tasks app: marionette labels Dec 14, 2020
@@ -8,10 +8,10 @@ const allMarionetteViewConstructors = [
];
const viewConstructorsSupportedByMarionette = allMarionetteViewConstructors
.filter((constructorName) => constructorName in Marionette)
.map((constructorName) => Marionette[constructorName]);
.map((constructorName) => (Marionette as any)[constructorName]);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to find the correct type but it's too 馃く for a non-marionette user.

Comment on lines +18 to +20
export const storiesOf = (...args: any) =>
clientApi.storiesOf(...args).addParameters({ framework });
export const load = (...args: any) => coreLoad(...args, framework);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be properly type as soon as I will rework some @storybook/core types

Comment on lines +4 to +6
export function webpack(config: Configuration) {
return config;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we need this but I didn't want to make changes to production code other than a simple TS migration.

@gaetanmaisse gaetanmaisse marked this pull request as ready for review December 14, 2020 21:05
@gaetanmaisse gaetanmaisse requested a review from a team December 14, 2020 21:06
@gaetanmaisse
Copy link
Member Author

gaetanmaisse commented Jan 5, 2021

I think we are good to go with this one @ndelangen @shilman, not sure the diffs in chromatic are relevant/related to this PR.

Copy link
Contributor

@ThibaudAV ThibaudAV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

IMHO take time to add robust typescript is interesting if users (+framework) are also adepts. if they are users of "js" this is not (or less) necessary 馃檴

@gaetanmaisse gaetanmaisse merged commit 2ba5bd6 into next Jan 13, 2021
@gaetanmaisse gaetanmaisse deleted the tech/migrate-marionnette-to-ts branch January 13, 2021 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants