swift-doc
swift-doc copied to clipboard
Add ability to specify entry point type
In my project, I use a an enum as namespacing and nest all my types inside it.
The main page looks like this: https://sindresorhus.com/playground/ However, I would like to make https://sindresorhus.com/playground/KeyboardShortcuts/ the main page. Maybe some config where I could specify the KeyboardShortcuts enum as the entry type.
Honestly, I think this is something we should solve at the language level.
It looks like you could avoid the redundant namespace by using the @warn_unqualified_access annotation. Unfortunately, this only applies to function declarations, but I think we should extend that to top-level variables and constants, too
Honestly, I think this is something we should solve at the language level.
I agree. Swift needs proper support for namespacing.
https://forums.swift.org/search?q=namespacing
It looks like you could avoid the redundant namespace by using the @warn_unqualified_access annotation. Unfortunately, this only applies to function declarations, but I think we should extend that to top-level variables and constants, too
That feels like a hack, and I assume the types would still be imported into the global namespace, just not usable without a warning.