some strict function fixes, #81574

This commit is contained in:
Johannes Rieken
2020-02-11 09:23:37 +01:00
parent 571ad3499b
commit 402a1cb949
7 changed files with 18 additions and 16 deletions

View File

@@ -55,11 +55,11 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha
//#region --- revive functions
private static _reviveLocationDto(data: ILocationDto): modes.Location;
private static _reviveLocationDto(data: ILocationDto[]): modes.Location[];
private static _reviveLocationDto(data: ILocationDto | ILocationDto[]): modes.Location | modes.Location[] {
private static _reviveLocationDto(data?: ILocationDto): modes.Location;
private static _reviveLocationDto(data?: ILocationDto[]): modes.Location[];
private static _reviveLocationDto(data: ILocationDto | ILocationDto[] | undefined): modes.Location | modes.Location[] | undefined {
if (!data) {
return <modes.Location>data;
return data;
} else if (Array.isArray(data)) {
data.forEach(l => MainThreadLanguageFeatures._reviveLocationDto(l));
return <modes.Location[]>data;