microsoft / microsoft/TypeScript-TmLanguage

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

Open
#788 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
471
Forks
149
PR merge metrics
No merged PRs in 30d

Description

Originally posted by @sheetalkamat in https://github.com/microsoft/TypeScript-TmLanguage/issues/522#issuecomment-549491582

@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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the TypeScript sample in the repository's TextMate grammar and inspect the rules responsible for optional chaining and nested property access. Compare the syntax highlighting with the expected treatment of the sample; done means optional-chain expressions are recognized correctly across the supported editor grammars.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.