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
ts-migration/no-hooks #322
Conversation
fo sho |
return hashMap; | ||
}, Object.create(null)); | ||
|
||
const isWhitelisted = (node: { callee: { name: string } }) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const isWhitelisted = (node: { callee: { name: string } }) => | |
const isWhitelisted = (node: JestFunctionCallExpressionWithIdentifierCallee<HookName>) => |
There was a problem hiding this comment.
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... 馃槢
There was a problem hiding this comment.
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 馃槀
There was a problem hiding this comment.
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
It might be best to rebase
reapply-ts
onmaster
, then rebase this PR 馃槵@SimenB can I leave that to you?