private boolean isUnextendableNativeClass ( NodeTraversal t , String className ) { // This list originally taken from the list of built-in objects at // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference // as of 2016-10-22. // - Intl.* classes were left out, because it doesn't seem worth the extra effort // of handling the qualified name. // - Deprecated and experimental classes were left out. switch ( className ) { case "Array" : case "ArrayBuffer" : case "Boolean" : case "DataView" : case "Date" : case "Float32Array" : case "Function" : case "Generator" : case "GeneratorFunction" : case "Int16Array" : case "Int32Array" : case "Int8Array" : case "InternalError" : case "Map" : case "Number" : case "Promise" : case "Proxy" : case "RegExp" : case "Set" : case "String" : case "Symbol" : case "TypedArray" : case "Uint16Array" : case "Uint32Array" : case "Uint8Array" : case "Uint8ClampedArray" : case "WeakMap" : case "WeakSet" : return ! isDefinedInSources ( t , className ) ; default : return false ; } }
Is the given class a native class for which we cannot properly transpile extension?