Skip to content

Discussion: Type casting and typing = position ambiguity #6519

Closed
@Alphapage

Description

@Alphapage

Hello,

Here is my code example:

let value : any;                   // ok javascript like 
(<string[]>value).length     // why not (value<string[]>).length

< string[] > value is more c# like : (string[])value in c#

Why not using a javascript style for typing and type casting: always put typing at the end of the expression ? (I mean "javascript style" because :any signature seems to be adopted)

Thanks in advance for your answers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions