-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
chore(gatsby): Convert get-static-dir to typescript #22083
Conversation
|
||
/** | ||
* copyStaticDirs | ||
* -- | ||
* Copy files from the static directory to the public directory | ||
*/ | ||
exports.copyStaticDirs = () => { | ||
export const copyStaticDirs = (): void | Promise<void> => { |
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.
can you look into what it would take to make this always return Promise and what impacts that would have on any consuming functions? I don't like the difference in return types here
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.
Instead of returning Promise.resolve
, he can just return
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.
Thanks @MichaelDeBoey!
I return undefined
instead of Promise.resolve
to pass consistent-return
rule.
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.
lgtm
Description
Convert
utils/get-static-dir
to typescriptRelated Issues
Related to #21995