TS struggles breaking down an AtomApi's type when chained methods (e.g. .setPromise(), .setExports(), etc) are called and extra layers are added (e.g. put the whole thing in a function called in a component and pass more inferred types - at least that's the general idea).
The Prettify helper doesn't need to wrap the whole class. Make it only wrap the Omit. This apparently drastically reduces the work TS has to do.
Description
TS struggles breaking down an AtomApi's type when chained methods (e.g.
.setPromise()
,.setExports()
, etc) are called and extra layers are added (e.g. put the whole thing in a function called in a component and pass more inferred types - at least that's the general idea).The
Prettify
helper doesn't need to wrap the whole class. Make it only wrap the Omit. This apparently drastically reduces the work TS has to do.