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

change generic parameter name of context type to prevent clash #1682

Merged
merged 1 commit into from Apr 14, 2019

Conversation

Projects
None yet
3 participants
@koenpunt
Copy link
Contributor

koenpunt commented Apr 9, 2019

when having a context interface name Context, it didn't work because the generic parameter was referring to itself. By naming it ContextType it's less common, and thus the change of having clash is smaller.

fixes #1681

@dotansimha

This comment has been minimized.

Copy link
Owner

dotansimha commented Apr 10, 2019

Thanks @koenpunt . Can you please update the failing tests?

@koenpunt

This comment has been minimized.

Copy link
Contributor Author

koenpunt commented Apr 10, 2019

I was trying to, but running the tests takes forever.. is there a way to speed that up? Also would be nice to not have to run yarn build every time before running the tests.

@dotansimha

This comment has been minimized.

Copy link
Owner

dotansimha commented Apr 10, 2019

You can run yarn build in the root to build all packages. Then you can use yarn build or yarn test inside a package directory.
You can also speed up the tests by running SKIP_VALIDATION=1 yarn test (it will skip the typescript compilation tests)

@kamilkisiela

This comment has been minimized.

Copy link
Collaborator

kamilkisiela commented Apr 10, 2019

Maybe T prefix everywhere, including TContext?

@koenpunt

This comment has been minimized.

Copy link
Contributor Author

koenpunt commented Apr 12, 2019

@kamilkisiela in this context (no pun intended) it's only an internal alias. Also ContextType matches with the already present ParentType used at the same locations.

@koenpunt koenpunt force-pushed the koenpunt:patch-1 branch 3 times, most recently from 8ca43a7 to e2ec2f1 Apr 12, 2019

change generic parameter name to prevent clash
when having a context interface name `Context`, it didn't work because the generic parameter was referring to itself. By naming it `ContextType` it's less common, and thus the change of having clash is smaller.

fixes #1681

@koenpunt koenpunt force-pushed the koenpunt:patch-1 branch from e2ec2f1 to f740846 Apr 12, 2019

@koenpunt

This comment has been minimized.

Copy link
Contributor Author

koenpunt commented Apr 12, 2019

Done

@dotansimha dotansimha merged commit 8eff469 into dotansimha:master Apr 14, 2019

1 check passed

ci/circleci: build Your tests passed on CircleCI!
Details

@koenpunt koenpunt deleted the koenpunt:patch-1 branch Apr 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.