typeof null

Rick Waldron waldron.rick at gmail.com
Tue May 8 09:19:23 PDT 2012


Aware that that typeof null has been rejected, but I was wondering if it
could be revived via the implicit "opt-in" path, eg:

non-strict, non-opt-in:

typeof null === "null"; // false

implied opt-in:

module Foo {
  export function create( options ) {

    if ( typeof options === "null" ) {
      return ... some default thing;
    }
  };
}

import create from Foo;

let default = create( null );


Is something like this even possible?

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120508/8c3d944c/attachment-0001.html>


More information about the es-discuss mailing list