You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is most evident in React lifecycle methods like componentDidMount which is transforms to an async method. (Currently componentDidMount async function due to #3 )
Regardless of whether it's for React, doesn't seem prudent for this codemod to change the contract of the code. E.g.,
function doesSomethingWithAPromise(): void {
promise.then(doSomething);
}
is being converted to:
async function doesSomethingWithAPromise(): Promise<void> {
await promise;
doSomething();
}
(hypothetically, haven't tested with this particular snippet) Point is that the return type has been changed from void to Promise<void>.
The text was updated successfully, but these errors were encountered:
This is most evident in React lifecycle methods like
componentDidMount
which is transforms to an async method. (CurrentlycomponentDidMount async function
due to #3 )Regardless of whether it's for React, doesn't seem prudent for this codemod to change the contract of the code. E.g.,
is being converted to:
(hypothetically, haven't tested with this particular snippet) Point is that the return type has been changed from
void
toPromise<void>
.The text was updated successfully, but these errors were encountered: