Skip to content

Use idiomatic/canonical option type annotations in Result module #14465

@cmeeren

Description

@cmeeren

Result.toOption has return type Option<'T>. The idiomatic/canonical notation is 'T option. The use of Option<'T> here means that Option<'T> shows up in code/line lens and tooltips all over my codebase when using this function, whereas I would prefer 'T option.

I haven't checked, but I am guessing that this could apply to other functions in the Result module, too.

For completeness, note that the same kind of issue would also apply to functions typed with List<'T> instead of 'T list, and other similar types. (I haven't checked or encountered any, though.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions