Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added PluginListInterface.stencil File #900

Merged
merged 2 commits into from
Feb 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//{{ file_header }}
{% if plugin_list_interface_imports %}

{% for import in plugin_list_interface_imports %}
import {{ import }}
{% endfor %}
{% endif %}

// This file defines the protocols and types in the Plugin List interface requiring public ACL for use in another module.

/// Declares the type of key used to identify plugins within the collection.
/// - NOTE: May be any ``Hashable`` type such as ``String`` or an enumeration.
internal typealias {{ plugin_list_name }}PluginListKeyType = String

/// Dynamic state from the caller provided to the plugins to use in determining whether they are enabled.
/// - NOTE: An alias to a tuple is supported.
internal typealias {{ plugin_list_name }}PluginListStateType = Void

{% if is_periphery_comment_enabled %}
// periphery:ignore
{% endif %}
/// @mockable
@MainActor
internal protocol {{ plugin_list_name }}PluginList {
func createAll() -> [{{ plugin_list_name }}Builder]
func create() -> {{ plugin_list_name }}Builder?
func create(key: {{ plugin_list_name }}PluginListKeyType) -> {{ plugin_list_name }}Builder?
}