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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS migrate: lib/client-api + app/angular + app/react + dependency upgrades #7323

Closed
wants to merge 61 commits into from

Conversation

ndelangen
Copy link
Member

combines #7147 & #6570

@ndelangen ndelangen self-assigned this Jul 5, 2019
# Conflicts:
#	docs/package.json
#	docs/src/versions/next.json
#	lib/client-api/src/client_api.ts
# Conflicts:
#	addons/knobs/src/components/Panel.tsx
#	addons/knobs/src/components/types/Checkboxes.js
#	addons/knobs/src/components/types/Files.js
#	addons/knobs/src/components/types/Options.js
#	app/angular/package.json
#	app/react/package.json
#	lib/cli/lib/initiate.js
#	lib/client-api/src/story_store.ts
#	lib/components/package.json
#	lib/components/src/blocks/Preview.tsx
#	lib/ui/src/components/layout/container.js
#	lib/ui/src/components/sidebar/treeview/treeview.js
#	lib/ui/src/index.js
#	scripts/bootstrap.js
#	yarn.lock
export interface Parameters {
fileName?: string;
options?: OptionsParameter;
[key: string]: any;
Copy link
Contributor

Choose a reason for hiding this comment

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

do we really want to allow this wildcard?
addons can argument this interface to add their own params.

the same question applies to StoryContext

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah these are extensible by design.

Copy link
Contributor

Choose a reason for hiding this comment

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

i think we missunderstand.

export interface Parameters {
  fileName?: string;
  options?: OptionsParameter;
}

is just as extensible when using interface augmentation, it just doesnt allow untyped params (because no index signature). see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces

# Conflicts:
#	app/angular/package.json
#	app/react/package.json
#	app/react/src/client/preview/types.ts
#	jest.config.js
#	lib/addons/src/make-decorator.ts
#	lib/components/package.json
#	scripts/compile-babel.js
#	yarn.lock
@ndelangen ndelangen closed this Jul 11, 2019
@ndelangen ndelangen deleted the client-api-plus-angular-plus-upgrades branch July 11, 2019 10:35
@ndelangen
Copy link
Member Author

I merged the PRs individually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants