MCPcopy Index your code
hub / github.com/nodejs/node / transform

Function transform

test/fixtures/snapshot/typescript.js:166922–166929  ·  view source on GitHub ↗

* Transform one or more nodes using the supplied transformers. * @param source A single `Node` or an array of `Node` objects. * @param transformers An array of `TransformerFactory` callbacks used to process the transformation. * @param compilerOptions Optional compiler options.

(source, transformers, compilerOptions)

Source from the content-addressed store, hash-verified

166920 * @param compilerOptions Optional compiler options.
166921 */
166922 function transform(source, transformers, compilerOptions) {
166923 var diagnostics = [];
166924 compilerOptions = ts.fixupCompilerOptions(compilerOptions, diagnostics); // TODO: GH#18217
166925 var nodes = ts.isArray(source) ? source : [source];
166926 var result = ts.transformNodes(/*resolver*/ undefined, /*emitHost*/ undefined, ts.factory, compilerOptions, nodes, transformers, /*allowDtsFiles*/ true);
166927 result.diagnostics = ts.concatenate(result.diagnostics, diagnostics);
166928 return result;
166929 }
166930 ts.transform = transform;
166931})(ts || (ts = {}));
166932//

Callers 2

visitAndTransformTypeFunction · 0.70
transformationFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected