SpecialRender Module
Functions and values
| Function or value |
Description
|
Full Usage:
renderErasedUnion caseCount
Parameters:
int
Returns: WidgetBuilder<TypeDefn>
|
|
Full Usage:
renderTypeKeyOfSRTP srtpMember
Parameters:
Name
-
Returns: WidgetBuilder<TypeDefn>
|
Renders a type definition for a SRTP bound
'T
'ReturnType
val object: 'T option (requires member ofValue)
val unbox: value: objnull -> 'T
val object: 'T (requires member ofValue)
'T: (member ofValue: 'ReturnType)
Now we can observe usage. If we were to create an untyped ofValue Subsequent usage would instantly resolve the type to the object it is used on, but this would invalidate it for usage on other types with the same property.
type TestObject =
{ ofValue: int }
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int type TestObject2 =
{ ofValue: string }
Multiple items
val string: value: 'T -> string -------------------- type string = System.String val testObject: TestObject
val testObject2: TestObject2
val ofValueAccessor: obj
We can also alternatively use the SRTP static method to access the value directly, without restricting the method to a single object type.
|