param paramZ param paramG param paramA export function functionWithParameters ( paramZ , paramG , paramA ) { return 0 ; } param someParam export const variableFunction = ( someParam ) => { return 0 ; } ; param requiredParam param optionalParam export function functionWithOptionalParam ( requiredParam , optionalParam ? ) { } param valueA param valueB param valueC param valueD param valueE export function functionWithDefaults ( valueA = 'defaultValue' , valueB = 100 , valueC = Number . NaN , valueD = true , valueE = null , valueF = '<foo>' ) { return valueA ; } param rest export function functionWithRest ( ... rest ) { return rest . join ( ', ' ) ; } param value export function multipleSignatures ( value ) ; param value param value . name export function multipleSignatures ( value ) ; /**
 * This is the actual implementation, this comment will not be visible
 * in the generated documentation.
 *
 */ export function multipleSignatures ( ) { return '' ; } export function functionWithUnionTypes ( arg , ... args ) { return null ; } export interface CallableSignature { ( ) : string ; } export function functionWithNamedParams ( { x : number , b : string } ) { return '' ; } private export function privateFunction ( ) { return '' ; } export const functionWithTypeParams = < Item = boolean | string > ( ) => true ; returns export function functionReturningAnObject ( ) { return { x : 1 , y : 2 } ; } returns export function functionReturningAFunction ( ) { return < T > ( x ) => true ; } returns export function commentsInReturn ( ) { return true ; } param value param cases returns export const swtch = < T , R > ( value , ... cases ) => ( def ) => { for ( const c of cases ) { if ( c [ 0 ] === value ) return c [ 1 ] ; } return def ; } ; export type _someCallback_ = ( name : string , value : unknown ) => void ; param __namedParameters param foo param bar export function functionWithNamedParamsAndComments ( { foo = 42 , bar = 43 } = { } , /**
 * Another param comment
 */ anotherParam ) { } param n export function functionWithPipesInParamsAndComments ( n ) { return n ; } export function functionWithReferenceType ( descriptor ) { return true ; } param params param params . name param params . nestedObj param context export function functionWithNestedParams ( params , context ) { return true ; } export class ClassWithConstructor { constructor ( x , y ) { } } export type User = { id : string ; data : string ; } ; export const promiseReturningASymbol = ( ) : Promise < User > => { return new Promise ( ( resolve ) => { resolve ( { id : 'id' , data : 'data' } ) ; } ) ; } ; export const promiseReturningAnObject = ( ) : Promise < { id : string ; data : string ; } > => { return new Promise ( ( resolve ) => { resolve ( { id : 'id' , data : 'data' } ) ; } ) ; } ;