Skip to content

Cast to "<any[]>" not possible within "<" comparison #43720

@jogibear9988

Description

@jogibear9988

This code does not work:

for (let i = 0; i < (<any[]>(<any>res).Data).length; i++) { }

if I'll refactor to this:

let ln = (<any[]>(<any>res).Data).length;
for (let i = 0; i < ln; i++) { }

it works.

is this intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: ParserThe parser didn't handle the syntax correctly

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions