Skip to content

Prefer flow #97

Open
Open
@thewilkybarkid

Description

@thewilkybarkid

If the argument for a pipe is only referenced in the first step, it can be replaced with a flow:

(foo) => pipe(
  foo,
  ...
)

and

(foo: FooType) => pipe(
  foo.bar,
  ...
)

can be:

flow(
  ...
)

and

flow(
  (foo: FooType): foo.bar,
  ...
)

Can be easier to read, and keeps it out of scope for the rest of the pipeline.

Real examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions