Skip to content
This repository was archived by the owner on Aug 17, 2023. It is now read-only.
This repository was archived by the owner on Aug 17, 2023. It is now read-only.

A Feature should define a configuration as a default export #7

@ethernian

Description

@ethernian

A Feature has only one goal: return a configuration to the Adapter. We don't need the Feature to be class for that: it is enough to implement it as a module with the configuration object as a default export. Dependencies should be provided as module parameters.

Old code:
https://github.com/dapplets/typescript-examples/blob/9cf90f21d642788b7be7fab84cebe38e950860a2/src/TwitterFeature/index.ts#L104-L110

New Code (pseudocode)

export default FeatureConfigurationType(
    @inject("Twitter.adapter.eth","v1.1.3") adaper: TwitterAdapter, 
    core: ICore) {
... //feature configuration
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    in discussionin discussion. do not implement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions