type FunctionVoid = ( ) => void ; type FunctionSimple = ( p1 : number [ ] , p2 : boolean ) => number ; type FunctionMaybeParam = ( p1 : number , p2 ? : boolean ) => number ; type FunctionWithOptionalParams = ( p1 : string , p2 ? : object , p3 ? : boolean ) => void ; type FunctionWithUnnamedParam = ( p1 : string , p2 : number ) => boolean ; type FunctionWithUnnamedParamMaybe = ( p1 : Array < string > , p2 : number | null | undefined ) => boolean ; type FunctionWithUnnamedParamMaybeReturn = ( p1 : object , p2 : number ) => boolean | null | undefined ; type FunctionWithUnnamedParamUnion = ( p1 : string , p2 : number | object ) => boolean | null ; type FunctionWithRestParam = ( p : string , ... numbers : number [ ] ) => number ; type FunctionWithUnnamedRestParam = ( p : string , ... rest : number [ ] ) => number ; type FunctionWithFunctionParams = ( f : ( p : number ) => boolean ) => void ; type FunctionWithUnnamedFunctionParams = ( p1 : ( p : number ) => boolean , p2 : string ) => void ; type FunctionWithTypeParam = < T > ( p : T ) => T ; type FunctionWithTypeParams = < T1 , T2 > ( p : T1 ) => T2 ; function functionEmpty ( ) { } function functionSimple ( p1 , p2 ) { } function functionSimpleWithReturn ( p1 , p2 ) { return p1 === p2 ; } function functionWithInitializer ( p1 , p2 = false ) { } function functionWithFunctionAsReturn ( ) { return function ( p = 5 ) { return p ; } ; } function functionWithOptionalParam ( p1 , p2 ? ) { } function functionWithOptionalParamAndInitializer ( p1 , p2 ? , p3 = false ) { } async function functionAsync ( ) { return 42 ; } const arrowFunctionEmpty = ( ) => { } ; const arrowFunctionWithParams = ( p1 , p2 ) => { } ; const arrowFunctionWithOptionalParam = x => x ; const arrowFunctionWithFunctionrAsReturn = ( ) => ( p = new Date ( ) ) => p ;