refactor(archive): replace FileTypes enum with const object#3845
refactor(archive): replace FileTypes enum with const object#3845realpha wants to merge 1 commit intodenoland:mainfrom
Conversation
Are you talking about
Let's skip this enum, as the current implementation will be deprecated once the new implementation lands. I'll close this PR and remove it from the list. Are you able to create a new issue regarding panicking when providing the incorrect file type? Either way, thank you for your help! |
Refers to this issue
This change was a little bit tricky because the exposed interfaces do not enforce
FileTypesin the input they receive. The oldenumalso wasn't exposed via the module API.Consequently, the implementations also don't really trust their input but it seems that failing to provide a correct filetype doesn't necessarily lead to a panic.
I've tried to make this change as minimally invasive as possible, but IMO it doesn't improve anything. Maybe this refactor should be completed in tandem with the stabilization of the
archivemodule API to actually contribute something to the overall maintainability and quality of this module.