tradeship
tradeship copied to clipboard
Erroneously removes used flow types
Correction: Only value types are removed erroneously. Snippet updated below.
Example input:
import { User } from "./types";
function updateUser(user: User) { // `User` only used here
/* do something here */
}
tradeship -w
output:
// Removed type import
function updateUser(user: User) { // `flow` complains about missing type
/* do something here */
}
Thanks for reporting this @creatorrr! Unfortunately, I don't have time to work on this. If this is something you're interested in fixing, happy to accept a PR here!