From ab8c94930f70631dc94c5b6086091cffe25b6af8 Mon Sep 17 00:00:00 2001 From: Gerrit0 Date: Sun, 3 Dec 2017 21:04:23 -0700 Subject: [PATCH] Update to latest Typescript version --- package.json | 14 +- src/lib/converter/converter.ts | 4 +- src/lib/utils/loggers.ts | 2 +- src/lib/utils/options/sources/component.ts | 18 -- ..._default_export_.defaultexportedclass.html | 2 +- src/test/renderer/specs/index.html | 2 + .../renderer/specs/modules/_variables_.html | 262 ++++++++++++++++++ 7 files changed, 275 insertions(+), 29 deletions(-) create mode 100644 src/test/renderer/specs/modules/_variables_.html diff --git a/package.json b/package.json index cc1d135c4..1e6d12fed 100644 --- a/package.json +++ b/package.json @@ -30,13 +30,13 @@ "node": ">= 4.2.0" }, "dependencies": { - "@types/fs-extra": "4.0.0", - "@types/handlebars": "4.0.31", - "@types/highlight.js": "9.1.8", - "@types/lodash": "4.14.74", + "@types/fs-extra": "4.0.5", + "@types/handlebars": "4.0.36", + "@types/highlight.js": "9.12.2", + "@types/lodash": "4.14.87", "@types/marked": "0.3.0", - "@types/minimatch": "2.0.29", - "@types/shelljs": "0.7.0", + "@types/minimatch": "3.0.1", + "@types/shelljs": "0.7.6", "fs-extra": "^4.0.0", "handlebars": "^4.0.6", "highlight.js": "^9.0.0", @@ -46,7 +46,7 @@ "progress": "^2.0.0", "shelljs": "^0.7.0", "typedoc-default-themes": "^0.5.0", - "typescript": "2.5.3" + "typescript": "2.6.2" }, "devDependencies": { "@types/mocha": "^2.2.39", diff --git a/src/lib/converter/converter.ts b/src/lib/converter/converter.ts index 7fd642260..c4369b28f 100644 --- a/src/lib/converter/converter.ts +++ b/src/lib/converter/converter.ts @@ -18,7 +18,7 @@ export interface ConverterResult { /** * An array containing all errors generated by the TypeScript compiler. */ - errors: ts.Diagnostic[]; + errors: ReadonlyArray; /** * The resulting project reflection. @@ -344,7 +344,7 @@ export class Converter extends ChildableComponent { const program = context.program; program.getSourceFiles().forEach((sourceFile) => { diff --git a/src/lib/utils/loggers.ts b/src/lib/utils/loggers.ts index d4c709ea7..c4b8be5e6 100644 --- a/src/lib/utils/loggers.ts +++ b/src/lib/utils/loggers.ts @@ -116,7 +116,7 @@ export class Logger { * * @param diagnostics The TypeScript messages that should be logged. */ - public diagnostics(diagnostics: ts.Diagnostic[]) { + public diagnostics(diagnostics: ReadonlyArray) { diagnostics.forEach((diagnostic) => { this.diagnostic(diagnostic); }); diff --git a/src/lib/utils/options/sources/component.ts b/src/lib/utils/options/sources/component.ts index cfc8a560a..924bfdb10 100644 --- a/src/lib/utils/options/sources/component.ts +++ b/src/lib/utils/options/sources/component.ts @@ -33,24 +33,6 @@ export class ComponentSource extends OptionsComponent { } } } - - private removeComponent(component: AbstractComponent) { - const name = component.componentName; - let index = this.knownComponents.indexOf(name); - if (index !== -1) { - this.knownComponents.slice(index, 1); - for (let declaration of component.getOptionDeclarations()) { - this.owner.removeDeclarationByName(declaration.name); - } - } - - if (component instanceof ChildableComponent) { - for (let child of component.getComponents()) { - this.removeComponent(child); - } - } - } - private onComponentAdded(e: ComponentEvent) { this.addComponent(e.component); } diff --git a/src/test/renderer/specs/classes/_default_export_.defaultexportedclass.html b/src/test/renderer/specs/classes/_default_export_.defaultexportedclass.html index eeaae4c47..6989f69ad 100644 --- a/src/test/renderer/specs/classes/_default_export_.defaultexportedclass.html +++ b/src/test/renderer/specs/classes/_default_export_.defaultexportedclass.html @@ -74,7 +74,7 @@

Class DefaultExportedClass

This class is exported via es6 export syntax.

-
export default class DefaultExportedClass
+					
export default class DefaultExportedClass
 
diff --git a/src/test/renderer/specs/index.html b/src/test/renderer/specs/index.html index ad20dab57..65ee68aa3 100644 --- a/src/test/renderer/specs/index.html +++ b/src/test/renderer/specs/index.html @@ -179,6 +179,8 @@

Plugins

Advanced guides and docs

Visit our homepage for advanced guides and an extensive API documentation:
diff --git a/src/test/renderer/specs/modules/_variables_.html b/src/test/renderer/specs/modules/_variables_.html new file mode 100644 index 000000000..c63c81a16 --- /dev/null +++ b/src/test/renderer/specs/modules/_variables_.html @@ -0,0 +1,262 @@ + + + + + + "variables" | typedoc + + + + + +

+
+
+
+ +
+
+ Options +
+
+ All +
    +
  • Public
  • +
  • Public/Protected
  • +
  • All
  • +
+
+ + + + + + +
+
+ Menu +
+
+
+
+
+
+ +

External module "variables"

+
+
+
+
+
+
+
+

Index

+
+
+
+

Variables

+ +
+
+
+
+
+

Variables

+
+ +

Const constVariable

+
constVariable: "const" = "const"
+ +
+
+

A const variable

+
+
+
+
+ +

Let letVariable

+
letVariable: string = "let"
+ +
+
+

A let variable

+
+
+
+
+ +

varVariable

+
varVariable: string = "var"
+ +
+
+

A var variable

+
+
+
+
+
+ +
+
+
+
+

Legend

+
+
    +
  • Module
  • +
  • Object literal
  • +
  • Variable
  • +
  • Function
  • +
  • Function with type parameter
  • +
  • Index signature
  • +
  • Type alias
  • +
+
    +
  • Enumeration
  • +
  • Enumeration member
  • +
  • Property
  • +
  • Method
  • +
+
    +
  • Interface
  • +
  • Interface with type parameter
  • +
  • Constructor
  • +
  • Property
  • +
  • Method
  • +
  • Index signature
  • +
+
    +
  • Class
  • +
  • Class with type parameter
  • +
  • Constructor
  • +
  • Property
  • +
  • Method
  • +
  • Accessor
  • +
  • Index signature
  • +
+
    +
  • Inherited constructor
  • +
  • Inherited property
  • +
  • Inherited method
  • +
  • Inherited accessor
  • +
+
    +
  • Protected property
  • +
  • Protected method
  • +
  • Protected accessor
  • +
+
    +
  • Private property
  • +
  • Private method
  • +
  • Private accessor
  • +
+
    +
  • Static property
  • +
  • Static method
  • +
+
+
+
+
+

Generated using TypeDoc

+
+
+ + + + \ No newline at end of file