Skip to content

@nhardy optional chaining is supported. If you have a sample that doesnt work please open another issue with it to track it separately. #788

Open

Description

Originally posted by Sheetal Nandi (@sheetalkamat) in #522 (comment)

Nathan Hardy (@nhardy) optional chaining is supported. If you have a sample that doesnt work please open another issue with it to track it separately.


Turns out optional chain doesn't work. 🙂

declare let foo: Foo | undefined;

foo && foo.bar && foo.bar.baz;

interface Foo {
    bar?: {
        baz?: string;
    }
}

image

Activity

  1. sheetalkamat commented on Nov 11, 2019

    @sheetalkamat
    Member

    ?. here has scope as punctuation.accessor.optional.ts I think it needs to be operator and that's the part missing ?

  2. DanielRosenwasser commented on Nov 12, 2019

    @DanielRosenwasser
    MemberAuthor

    Potentally - what exactly is the scope for .?

  3. sheetalkamat commented on Nov 12, 2019

    @sheetalkamat
    Member

    punctuation.accessor.ts and that was why ?. had similar scope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions