Skip to content

Commit

Permalink
[[FIX]] allow typeof symbol === "symbol"
Browse files Browse the repository at this point in the history
Closes #2241
Closes #2242
  • Loading branch information
jamiebuilds authored and caitp committed Mar 8, 2015
1 parent 6bf7653 commit 7f7aac2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/jshint.js
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ var JSHINT = (function() {

var values = [
"undefined", "object", "boolean", "number",
"string", "function", "xml", "object", "unknown"
"string", "function", "xml", "object", "unknown", "symbol"
];

if (right.type === "(identifier)" && right.value === "typeof" && left.type === "(string)")
Expand Down
1 change: 1 addition & 0 deletions tests/unit/fixtures/typeofcomp.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if (typeof func === 'number') {}
if (typeof func === 'string') {}
if (typeof func === 'function') {}
if (typeof func === 'unknown') {}
if (typeof func === 'symbol') {}
if (typeof func === "xml") {}
if (typeof func === "object") {}
if ("undefined" === typeof func) {}
Expand Down

0 comments on commit 7f7aac2

Please sign in to comment.