Make 'kind' non-enumerable.

This commit is contained in:
Cyrus Najmabadi 2014-11-21 15:29:13 -08:00
parent eb35cd5d59
commit ca5a01b3ae

View File

@ -38,7 +38,7 @@ module TypeScript {
module TypeScript.Syntax {
function addArrayPrototypeValue(name: string, val: any) {
if (Object.defineProperty && (<any>Array.prototype)[name] === undefined) {
Object.defineProperty(Array.prototype, name, { value: val, writable: false });
Object.defineProperty(Array.prototype, name, { value: val, writable: false, enumerable: false });
}
else {
(<any>Array.prototype)[name] = val;