Logo Xantham

KeyBinding Type

How a `K extends keyof T` variable is written in F# (ยง4.10, the open keyof regime). TypeScript's key variable has no F# counterpart of its own: a bare `'K` would be an unconstrained variable saying nothing about T's keys, and every use of it - including the `T[K]` it selects - would have to widen to obj. The support package carries the idiom instead, so `'K` is not bound at all; its uses are written as one of these.

Union cases

Union case Description

KeyOf operand

Full Usage: KeyOf operand

Parameters:
    operand : string

`keyof<'T>`: the key is only ever a key, so nothing needs the type it selects.

operand : string

TypedKeyOf(operand, result)

Full Usage: TypedKeyOf(operand, result)

Parameters:
    operand : string
    result : string

`typekeyof<'T,'R>` at the key's uses and `'R` at `T[K]`: the signature reads the value the key selects, so `'K` is replaced by the result variable that names it.

operand : string
result : string

Instance members

Instance member Description

this.IsKeyOf

Full Usage: this.IsKeyOf

Returns: bool
Returns: bool

this.IsTypedKeyOf

Full Usage: this.IsTypedKeyOf

Returns: bool
Returns: bool

Type something to start searching.