import * as ts from 'typescript'; import { FacadeConverter } from './facade_converter'; /** * To support arbitrary d.ts files in Dart we often have to merge two TypeScript * types into a single Dart type because Dart lacks features such as method * overloads, type aliases, and union types. */ export declare class MergedType { private fc; constructor(fc: FacadeConverter); merge(t?: ts.TypeNode): void; toTypeNode(): ts.TypeNode; /** * Generate a type node where we have stripped out type features that Dart does not support. * Currently this means stripping out union types. */ toSimpleTypeNode(): ts.TypeNode; private types; } /** * Handle a parameter that is the result of merging parameter declarations from * multiple method overloads. */ export declare class MergedParameter { constructor(param: ts.ParameterDeclaration, fc: FacadeConverter); merge(param: ts.ParameterDeclaration): void; toParameterDeclaration(): ts.ParameterDeclaration; setOptional(): void; private name; private type; private optional; private textRange; } /** * Handle a parameter that is the result of merging parameter declarations from * multiple method overloads. */ export declare class MergedTypeParameter { constructor(param: ts.TypeParameterDeclaration, fc: FacadeConverter); merge(param: ts.TypeParameterDeclaration): void; toTypeParameterDeclaration(): ts.TypeParameterDeclaration; private name; private constraint; private textRange; } /** * Handle a parameter that is the result of merging parameter declarations from * multiple method overloads. */ export declare class MergedTypeParameters { private fc; private mergedParameters; private textRange; constructor(fc: FacadeConverter); merge(params: ts.NodeArray): void; toTypeParameters(): ts.NodeArray; } /** * Represents a merged class member. If the member was not overloaded, the constituents array * will contain only the original declaration and mergedDeclaration will just be the original * declaration. If the member was an overloaded method, the constituents array will contain all * overloaded declarations and mergedDeclaration will contain the result of merging the overloads. */ export declare class MergedMember { constituents: ts.SignatureDeclaration[]; mergedDeclaration: ts.SignatureDeclaration; constructor(constituents: ts.SignatureDeclaration[], mergedDeclaration: ts.SignatureDeclaration); isOverloaded(): boolean; } /** * Normalize a SourceFile. */ export declare function normalizeSourceFile(f: ts.SourceFile, fc: FacadeConverter, fileSet: Set, renameConflictingTypes?: boolean, explicitStatic?: boolean): ts.SourceFile;