1. 12
  1.  

  2. 2

    The object type is a new type in 2.2 that matches any types except for primitive types. In other words, you can assign anything to the object type except for boolean, number, string, null, undefined, and symbol.

    Did TypeScript have non-nullable types by default before?

    1. 4

      The article has been revised since you asked your question. It now reads:

      In other words, you can assign anything to the object type except for string, boolean, number, symbol, and, when using strictNullChecks, null and undefined.

        1. 2

          “by default” :-)

          1. 2

            sorry, I didnt actually realize it wasnt a default - ive always used it since it was in beta so I guess I forgot.