Skip to content

[typescript-angular] Angular 7: An expression of type 'void' cannot be tested for truthiness #234

Description

@smartym-pb

formParam.append returns void
but below it is flollowed by logical OR
Here is example of generated code:
let formParams: { append(param: string, value: any): void; };

if (file !== undefined) {
    formParams = formParams.append('file', <any>file) || formParams;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions