Skip to content

Documentation/Hint on each function #27

@AlbertoDePena

Description

@AlbertoDePena

I think I have suggested renaming s and str to something more userfriendly but got rejected =/
Can we instead provide documentation with /// on each of the functions? I think the documentation in the Elmish.UrlParser github page is very helpful, so maybe adding it to the function would also provide value...

* s combinator for a static string we expect to find in the URL,
* </> combinator to capture a slash in the URL,
* str combinator to extract a string,
* i32 combinator to attempt to parse an int.
* top combinator that takes nothing.
* remaining combinator to get the remaining parts of the URL

I tend to shadow like this to provide clarity:

// combinator for a static string we expect to find in the URL
let matchString = UrlParser.s
// combinator to extract a string
let parseString = UrlParser.str
// combinator to attempt to parse and Int32
let parseInt32 = UrlParser.i32

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions