namespace ts { param source param transformers param compilerOptions export function transform < T extends Node > ( source , transformers , compilerOptions ? ) { const diagnostics = [ ] ; compilerOptions = fixupCompilerOptions ( compilerOptions ! , diagnostics ) ; const nodes = isArray ( source ) ? source : [ source ] ; const result = transformNodes ( undefined , undefined , factory , compilerOptions , nodes , transformers , true ) ; result . diagnostics = concatenate ( result . diagnostics , diagnostics ) ; return result ; } }