[question] Using a filesystem-based barrel
rlubke opened this issue · comments
Pretty new to the JS scene, so please bear with me.
I'm working on a project with a complex source hierarchy. I've stumbled on the concept of barrel files, and am attempting to apply this to my project.
I've been successful with the flat structure, but now I'd like to try the file system approach. I've generated the index with the new options and I see something like:
export const cache = {
NamedCache: cachenamed_cachets,
NamedCacheClient: cachenamed_cache_clientts,
Session: cachesessionts,
StreamedCollections: cachestreamed_collectionts,
};
Within my IDE, I can import cache
, but I'm not able to properly reference the entities within the const
definition. My java brain though it would be cache.NamedCacheClient
when using the type, but that doesn't seem to be the case.
Mind offering an example of how one would actually use the barrel generated in filesystem mode? Or if there's a place I can RTFM to understand this better, feel free to redirect me.
Thanks!