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

ts-migration/no-hooks #322

Merged
merged 3 commits into from Jul 20, 2019
Merged

ts-migration/no-hooks #322

merged 3 commits into from Jul 20, 2019

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Jul 20, 2019

It might be best to rebase reapply-ts on master, then rebase this PR 馃槵

@SimenB can I leave that to you?

@SimenB
Copy link
Member

SimenB commented Jul 20, 2019

@SimenB can I leave that to you?

fo sho

return hashMap;
}, Object.create(null));

const isWhitelisted = (node: { callee: { name: string } }) =>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const isWhitelisted = (node: { callee: { name: string } }) =>
const isWhitelisted = (node: JestFunctionCallExpressionWithIdentifierCallee<HookName>) =>

Copy link
Member

@SimenB SimenB Jul 20, 2019

Choose a reason for hiding this comment

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

Could we possibly do export type JestHookFunction = JestFunctionCallExpressionWithIdentifierCallee<HookName> or something? 馃檪 The name is so long... 馃槢

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could we possibly do...

fo sho

The name is so long... 馃槢

Yeah, it is - I might do a clean up PR soon, and rename them to something like Fn to make them a touch shorter.

Sadly, that's just pretty much what always happens when working w/ AST nodes - there's so much contextual type information that you end up w/ really very verbose but long type names 馃槀

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we can go through after everything is migrated. I bet we'll see some patterns or something we can abstract out to make it a bit more readable at that point

@SimenB SimenB merged commit a4bdeb3 into jest-community:reapply-ts Jul 20, 2019
@SimenB SimenB mentioned this pull request Jul 20, 2019
35 tasks
@G-Rath G-Rath deleted the ts-migration/no-hooks branch July 20, 2019 11:01
SimenB pushed a commit that referenced this pull request Jul 21, 2019
SimenB pushed a commit that referenced this pull request Jul 21, 2019
SimenB pushed a commit that referenced this pull request Jul 22, 2019
SimenB pushed a commit that referenced this pull request Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants