Closed yonran closed 3 years ago
Looks good, thanks for the great work!
Yup this project uses yarn 1 instead of npm. Be on the lookout for yarn.lock
in other repos, I wish npm would warn when it sees it.
:tada: This PR is included in version 2.2.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Previously, asyncify would convert a getter/setter into an invalid async getter/setter.
Input:
Output before this PR. Note that
get prop()
is converted toasync get prop()
, which is invalid ECMAScript and invalid TypeScript:Output after this PR:
get
andset
methods are not converted to async, and instead an immediately invoked function expression (IIFE) is created, or the promise chain is ignored, depending on the length of the chain.I made a similar PR here https://github.com/sgilroy/async-await-codemod/pull/21 but then I found this repo where all the action seems to be
Note: the precommit hook failed in
tsc --noEmit
on files that I did not modify (with errors likeType 'NodePath<Node>' is not assignable to type 'T extends Program ? null : NodePath<Node>'
), so I had togit commit --no-verify
. Probably Inpm install
ed a different version of TypeScript than you use. Please advise on how to continue.