Skip to content

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.

2 participants