Adding Flag, showing whether a return type exists or not.

This commit is contained in:
Martin Karkowski 2020-08-24 23:08:46 +02:00
parent bb95716986
commit 7e3bab41e6

View File

@ -38,6 +38,7 @@ export type MethodInformation = {
isGenerator: boolean;
isImplementation: boolean;
returnType: TypeInformation;
hasReturnType: boolean;
head: string;
authorDescription: string;
}
@ -373,6 +374,7 @@ export function getDescription(declaration: PropertyDeclaration | InterfaceDecla
retTypeObj,
retTypeObj.getText()
);
const hasReturnType = returnType.simplifiedSubType !== 'void';
// Use the Regex to remove the Imports from the Head
const regex = /import\(.+?\)./g
@ -418,6 +420,7 @@ export function getDescription(declaration: PropertyDeclaration | InterfaceDecla
isGenerator,
isImplementation,
returnType,
hasReturnType,
authorDescription
}
}