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a,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACpD,CAAC;AAFD,sCAEC;AAGD,iCAAwC,IAAwB;IAC9D,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAC9D,CAAC;AAFD,0DAEC;AAGD,+BAAsC,IAAa,EAAE,IAAY;IAC/D,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAC5D,CAAC;AAFD,sDAEC;AAGD,0BAAiC,IAAa;IAC5C,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACvD,CAAC;AAFD,4CAEC;AAGD,8CAAqD,IAAuD;IAC1G,MAAM,CAAC,KAAK,CAAC,oCAAoC,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAC3E,CAAC;AAFD,oFAEC;AAGD,kDAAyD,IAA6B;IACpF,MAAM,CAAC,KAAK,CAAC,wCAAwC,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAC/E,CAAC;AAFD,4FAEC;AAGD,mCAA0C,IAA6B;IACrE,MAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAChE,CAAC;AAFD,8DAEC;AAQY,QAAA,cAAc,GAMvB,KAAK,CAAC,cAAc,CAAC;AAEZ,QAAA,kBAAkB,GAAwB,KAAK,CAAC,kBAAkB,CAAC;AAenE,QAAA,WAAW,GAIpB,KAAK,CAAC,WAAW,CAAC","sourcesContent":["import * as ts from 'typescript';\nconst tsany = ts as any;\n\n/**\n * Expose the internal TypeScript APIs that are used by TypeDoc\n */\ndeclare module 'typescript' {\n interface Symbol {\n // https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/types.ts#L2658\n id?: number;\n // https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/types.ts#L2660\n parent?: ts.Symbol;\n }\n\n interface Node {\n // https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/types.ts#L497\n symbol?: ts.Symbol;\n // https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/types.ts#L500\n localSymbol?: ts.Symbol;\n // https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/types.ts#L499\n nextContainer?: ts.Node;\n }\n}\n\n/**\n * These functions are in \"core\" and are marked as @internal:\n * https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/core.ts#L9-L10\n */\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/core.ts#L1133-LL1134\nexport function createCompilerDiagnostic(message: ts.DiagnosticMessage, ...args: (string | number)[]): ts.Diagnostic;\nexport function createCompilerDiagnostic(message: ts.DiagnosticMessage): ts.Diagnostic;\nexport function createCompilerDiagnostic() {\n return tsany.createCompilerDiagnostic.apply(this, arguments);\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/core.ts#L1191\nexport function compareValues(a: T, b: T): number {\n return tsany.compareValues.apply(this, arguments); // Actually returns a ts.Comparison which is also internal\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/core.ts#L1281\nexport function normalizeSlashes(path: string): string {\n return tsany.normalizeSlashes.apply(this, arguments);\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/core.ts#L1288\nexport function getRootLength(path: string): number {\n return tsany.getRootLength.apply(this, arguments);\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/core.ts#L1368-L1370\nexport function getDirectoryPath(path: ts.Path): ts.Path;\nexport function getDirectoryPath(path: string): string;\nexport function getDirectoryPath() {\n return tsany.getDirectoryPath.apply(this, arguments);\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.2.1/src/compiler/core.ts#L1418\nexport function normalizePath(path: string): string {\n return tsany.normalizePath(path);\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.2.1/src/compiler/core.ts#L1628\nexport function combinePaths(path1: string, path2: string): string {\n return tsany.combinePaths(path1, path2);\n}\n\n/**\n * These functions are in \"utilities\" and are marked as @internal:\n * https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/utilities.ts#L3-L4\n */\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/utilities.ts#L152\nexport function getSourceFileOfNode(node: ts.Node): ts.SourceFile {\n return tsany.getSourceFileOfNode.apply(this, arguments);\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/utilities.ts#L301\nexport function getTextOfNode(node: ts.Node, includeTrivia = false): string {\n return tsany.getTextOfNode.apply(this, arguments);\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/utilities.ts#L473\nexport function declarationNameToString(name: ts.DeclarationName): string {\n return tsany.declarationNameToString.apply(this, arguments);\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/utilities.ts#L1423\nexport function getJSDocCommentRanges(node: ts.Node, text: string) {\n return tsany.getJSDocCommentRanges.apply(this, arguments);\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/utilities.ts#L3738\nexport function isBindingPattern(node: ts.Node): node is ts.BindingPattern {\n return tsany.isBindingPattern.apply(this, arguments);\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/utilities.ts#L1729\nexport function getClassExtendsHeritageClauseElement(node: ts.ClassLikeDeclaration | ts.InterfaceDeclaration) {\n return tsany.getClassExtendsHeritageClauseElement.apply(this, arguments);\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/utilities.ts#L1734\nexport function getClassImplementsHeritageClauseElements(node: ts.ClassLikeDeclaration) {\n return tsany.getClassImplementsHeritageClauseElements.apply(this, arguments);\n}\n\n// https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/utilities.ts#L1739\nexport function getInterfaceBaseTypeNodes(node: ts.InterfaceDeclaration) {\n return tsany.getInterfaceBaseTypeNodes.apply(this, arguments);\n}\n\n/**\n * https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/types.ts#L3347\n * This is large enum of char codes.\n *\n * Faking the enum as a var (only certain codes are used by TypeDoc)\n */\nexport const CharacterCodes: {\n [key: string]: number;\n doubleQuote: number;\n space: number;\n minus: number;\n at: number;\n} = tsany.CharacterCodes;\n\nexport const optionDeclarations: CommandLineOption[] = tsany.optionDeclarations;\n\n/**\n * Command line options\n *\n * https://github.com/Microsoft/TypeScript/blob/v2.1.4/src/compiler/types.ts#L3344\n */\nexport interface CommandLineOption {\n name: string;\n type: string;\n shortName: string;\n description: DiagnosticsEnumValue;\n paramType: DiagnosticsEnumValue;\n}\n\nexport const Diagnostics: {\n [key: string]: DiagnosticsEnumValue;\n FILE: DiagnosticsEnumValue;\n DIRECTORY: DiagnosticsEnumValue;\n} = tsany.Diagnostics;\n\nexport interface DiagnosticsEnumValue {\n code: number;\n category: ts.DiagnosticCategory;\n key: string;\n message: string;\n}\n"]}