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
Currently we have a couple helpers which change their behavior depending on the type of construct:
replaceNodeAndUpdateImports
generateImportText
updateImports
getOriginal
formatReplacement
These are generally inconsistent in what parameters they take, and in what order. Furthermore, in some cases some of the parameters are unused, e.g. the 'constructor' type requires much less information than others.
We should change all of these (or at least most?) to have a signature like (type, ... any other information that doesn't depend on type ..., options), where options contains the relevant type-specific information. For example, getOriginal(type, { name, module }) is nice, because for type = 'constructor', you don't need module. (This might also be an opportunity to improve the naming of the arguments... e.g. name of what?)
The text was updated successfully, but these errors were encountered:
Currently we have a couple helpers which change their behavior depending on the type of construct:
These are generally inconsistent in what parameters they take, and in what order. Furthermore, in some cases some of the parameters are unused, e.g. the 'constructor' type requires much less information than others.
We should change all of these (or at least most?) to have a signature like
(type, ... any other information that doesn't depend on type ..., options)
, whereoptions
contains the relevant type-specific information. For example,getOriginal(type, { name, module })
is nice, because for type = 'constructor', you don't needmodule
. (This might also be an opportunity to improve the naming of the arguments... e.g. name of what?)The text was updated successfully, but these errors were encountered: