title: What is a good alternative to object and any?
body: <p>The general advice in Typescript community seems to be against the use of <code>object</code> type.</p>
  <p>I gather it is because of the following behavior:</p>
  <p>Trying to access <strong>any</strong> property on an <code>object</code> gives a &quot;property does not exist on type 'object'&quot; error [1]</p>
  <p>For the same reason, the popular linter - typescript-eslint - bans the use of object and instead recommends the use of <code>Record&lt;string, unknown&gt;</code> [2].</p>
  <p>While I think <code>Record&lt;string,any&gt;</code> may have been a better choice; perhaps <code>unknown</code> was chosen in favour of <code>any</code> as <code>any</code> is essentially opting out of types.</p>
  <p>But the issue with <code>unknown</code> is that, it too requires extra code in terms of type guards before anything can be done with them [3].</p>
  <p>I think, there is a need for a better solution; something that is not as restrictive as <code>object</code> or <code>unknown</code> but at the same time sits well with popular linters.</p>
  <p>Any ideas ?</p>
  <p>I guess my specific question will be:</p>
  <p>I want to keep typescript-eslint happy without resorting to <code>unknown</code> ... is it possible ?</p>
  <p>Notes:</p>
  <ul>
  <li>[1] It may be possible to access properties under a type guard (<a href="https://github.com/microsoft/TypeScript/issues/21732" rel="nofollow noreferrer">https://github.com/microsoft/TypeScript/issues/21732</a>). But I want to avoid the use of type guards for simplicity.</li>
  <li>[2] <a href="https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-types.md#default-options" rel="nofollow noreferrer">https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-types.md#default-options</a></li>
  <li>[3] <a href="https://www.typescriptlang.org/docs/handbook/2/functions.html#unknown" rel="nofollow noreferrer">https://www.typescriptlang.org/docs/handbook/2/functions.html#unknown</a></li>
  </ul>