Closed agilgur5 closed 2 years ago
Very likely that ConsoleContext
will be removed per my realization in https://github.com/ezolenko/rollup-plugin-typescript2/pull/345#issuecomment-1200277838, but this PR will also make it easier to remove it as all the code is now in this one file and all the imports are from this one file
Summary
Merge the two context files into a single file as they're intended to be as similar as possible. They're also not meant to be more extensible to create other contexts (unlike say, the cache interfaces etc), these are the only two contexts intended.
IMO, the slight, small distinction between them would've been easier to understand/catch on to if I saw them together like this than in separate files.
Details
they're virtually identical, so combine them instead of keeping them separate
refactor out
_.isFunction
with a simplegetText
function insteadlodash
removal! (follow-up to #328)add docstrings about when to use the two contexts
Future Work
diagnostics
files and thetsconfig
files, as they're also only used in the same context and not in other contexts. Planning to add more unit tests first though