({function: func, links, grouped}: FunctionAPIProps)
| 34 | } |
| 35 | |
| 36 | export function FunctionAPI({function: func, links, grouped}: FunctionAPIProps) { |
| 37 | let {name, parameters, return: returnType, typeParameters} = func; |
| 38 | if (links) { |
| 39 | setLinks(links); |
| 40 | } |
| 41 | return ( |
| 42 | <code className={mergeStyles(codeStyles.function, grouped ? groupedBlock : block)}> |
| 43 | <span className={codeStyles.attribute}>{name}</span> |
| 44 | <TypeParameters typeParameters={typeParameters} /> |
| 45 | <Indent params={parameters} open="(" close=")"> |
| 46 | <JoinList elements={parameters} joiner=", " /> |
| 47 | </Indent> |
| 48 | <span className={codeStyles.string}>{': '}</span> |
| 49 | <Type type={returnType} /> |
| 50 | </code> |
| 51 | ); |
| 52 | } |
| 53 | |
| 54 | export function FunctionAPIGroup({functions}: {functions: FunctionAPIProps[]}) { |
| 55 | return ( |
nothing calls this directly
no test coverage detected