make ts compiler options more strict

This commit is contained in:
Kim Biesbjerg
2019-09-18 13:36:08 +02:00
parent 7bf0c138b8
commit 8c8fe8d131
5 changed files with 16 additions and 13 deletions

View File

@@ -9,12 +9,12 @@ const MARKER_IMPORT_NAME = 'marker';
export class MarkerParser implements ParserInterface {
public extract(contents: string, filePath: string): TranslationCollection | null {
const sourceFile = tsquery.ast(contents, filePath);
public extract(source: string, filePath: string): TranslationCollection | null {
const sourceFile = tsquery.ast(source, filePath);
const markerImportName = getNamedImportAlias(sourceFile, MARKER_MODULE_NAME, MARKER_IMPORT_NAME);
if (!markerImportName) {
return;
return null;
}
let collection: TranslationCollection = new TranslationCollection();

View File

@@ -14,7 +14,7 @@ export class ServiceParser implements ParserInterface {
const classDeclarations = findClassDeclarations(sourceFile);
if (!classDeclarations) {
return;
return null;
}
let collection: TranslationCollection = new TranslationCollection();