Skip to content

Commit

Permalink
Resolve build errors
Browse files Browse the repository at this point in the history
Strict null checks required a few changes to code changed by this PR.
  • Loading branch information
Gerrit0 committed Oct 28, 2018
1 parent 34b7a4c commit e5ed318
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/lib/converter/context.ts
Expand Up @@ -95,7 +95,7 @@ export class Context {
/**
* The pattern that should be used to flag external source files.
*/
private externalPattern: Array<IMinimatch>;
private externalPattern?: Array<IMinimatch>;

/**
* Create a new Context instance.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/converter.ts
Expand Up @@ -45,7 +45,7 @@ export class Converter extends ChildableComponent<Application, ConverterComponen
help: 'Define patterns for files that should be considered being external.',
type: ParameterType.Array
})
externalPattern: Array<string>;
externalPattern!: Array<string>;

@Option({
name: 'includeDeclarations',
Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils/options/readers/tsconfig.ts
Expand Up @@ -40,7 +40,7 @@ export class TSConfigReader extends OptionsComponent {
return;
}

let file: string;
let file: string | undefined;

if (TSConfigReader.OPTIONS_KEY in event.data) {
const tsconfig = event.data[TSConfigReader.OPTIONS_KEY];
Expand All @@ -52,7 +52,7 @@ export class TSConfigReader extends OptionsComponent {
}

if (!file || !FS.existsSync(file)) {
event.addError('The tsconfig file %s does not exist.', file);
event.addError('The tsconfig file %s does not exist.', file || '');
return;
}
} else if (TSConfigReader.PROJECT_KEY in event.data) {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils/options/readers/typedoc.ts
Expand Up @@ -31,7 +31,7 @@ export class TypedocReader extends OptionsComponent {
return;
}

let file: string;
let file: string | undefined;

if (TypedocReader.OPTIONS_KEY in event.data) {
let opts = event.data[TypedocReader.OPTIONS_KEY];
Expand All @@ -42,7 +42,7 @@ export class TypedocReader extends OptionsComponent {

file = this.findTypedocFile(opts);

if (!FS.existsSync(file)) {
if (!file || !FS.existsSync(file)) {
event.addError('The options file could not be found with the given path %s.', opts);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/renderer/specs/index.html
Expand Up @@ -203,4 +203,4 @@ <h2>Legend</h2>
<script src="assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="assets/js/search.js"><' + '/script>');</script>
</body>
</html>
</html>

0 comments on commit e5ed318

Please sign in to comment.