tsickle
Version:
Transpile TypeScript code to JavaScript with Closure annotations.
25 lines (24 loc) • 1.06 kB
TypeScript
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @fileoverview Interactions with http://github.com/angular/clutz, which
* is the inverse of Tsickle: Clutz converts Closure-annotated JS to d.ts files.
*
* It turns out when interacting with Clutz code, tsickle needs to be aware of
* Clutz in a few ways. The functionality in this module is only needed in apps
* that use both Clutz and Tsickle together.
*/
import * as ts from 'typescript';
/**
* Constructs a ts.CustomTransformerFactory that postprocesses the .d.ts
* that are generated by ordinary TypeScript compilations to add some
* Clutz-specific logic. See generateClutzAliases.
*
* @param pathToModuleName Converts an absolute path to its dotted Closure name.
*/
export declare function makeDeclarationTransformerFactory(typeChecker: ts.TypeChecker, pathToModuleName: (path: string) => string): ts.CustomTransformerFactory;