Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Should leading ampersands (&) be allowed in intersection types? #17916

Copy link
Copy link
@Ailrun

Description

@Ailrun
Issue body actions

TypeScript Version: 2.4.2 / playground (2.3.?)

Code

let x: (& number & string);

Expected behavior:
Emits error, since language spec said,

IntersectionType: IntersectionOrPrimaryType & PrimaryType

in the subsection 3.8.7

Actual behavior:
Doesn't emit error and uses it as number & string.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug

    Type

    No type
    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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.