title: Using optional chaining operator for object property access
body: <p>TypeScript 3.7 now supports the <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#optional-chaining" rel="noreferrer">optional chaining operator</a>. Hence, you can write code such as:</p>
  <pre><code>const value = a?.b?.c;
  </code></pre>
  <p>I.e., you can use this operator to access properties of an object, where the object itself may be <code>null</code> or <code>undefined</code>. Now what I would like to do is basically the same, but the property names are dynamic:</p>
  <pre><code>const value = a?[b]?.c;
  </code></pre>
  <p>However, there I get a syntax error:</p>
  <blockquote>
  <p>error TS1005: ':' expected.</p>
  </blockquote>
  <p>What am I doing wrong here? Is this even possible?</p>
  <p>The <a href="https://github.com/tc39/proposal-optional-chaining#syntax" rel="noreferrer">proposal</a> seems to imply that this is not possible (but maybe I get the syntax examples wrong).</p>