Skip to content

Add Sample for Typed equivalents for workflow.* functions/interfaces using generics #313

@ndtretyak

Description

@ndtretyak

Is your feature request related to a problem? Please describe.
Currently, there are a lot of interfaces and functions (e.g., side effects and channels) accepting or returning interface{}. I believe that with generics, it is possible to provide Typed equivalents for these interfaces, enhancing type safety.

Describe the solution you'd like
For instance, a side effect could take a typed function f and return f() directly instead of some converter.EncodedValue

func TypedSideEffect[T any](ctx Context, f func(ctx Context) T) (T, error)

Describe alternatives you've considered
Implement these typed interfaces in my own code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions