TypeScript/tests/baselines/reference/globalThisBlockscopedProperties.types
TypeScript Bot 4e237ed66f
🤖 Update TypeScript DOM Libs (#46222)
Co-authored-by: orta <orta@users.noreply.github.com>
2021-10-28 09:14:26 -07:00

70 lines
16 KiB
Plaintext

=== tests/cases/conformance/es2019/globalThisBlockscopedProperties.ts ===
var x = 1
>x : number
>1 : 1
const y = 2
>y : 2
>2 : 2
let z = 3
>z : number
>3 : 3
globalThis.x // ok
>globalThis.x : number
>globalThis : typeof globalThis
>x : number
globalThis.y // should error, no property 'y'
>globalThis.y : any
>globalThis : typeof globalThis
>y : any
globalThis.z // should error, no property 'z'
>globalThis.z : any
>globalThis : typeof globalThis
>z : any
globalThis['x'] // ok
>globalThis['x'] : number
>globalThis : typeof globalThis
>'x' : "x"
globalThis['y'] // should error, no property 'y'
>globalThis['y'] : any
>globalThis : typeof globalThis
>'y' : "y"
globalThis['z'] // should error, no property 'z'
>globalThis['z'] : any
>globalThis : typeof globalThis
>'z' : "z"
globalThis.Float64Array // ok
>globalThis.Float64Array : Float64ArrayConstructor
>globalThis : typeof globalThis
>Float64Array : Float64ArrayConstructor
globalThis.Infinity // ok
>globalThis.Infinity : number
>globalThis : typeof globalThis
>Infinity : number
declare let test1: (typeof globalThis)['x'] // ok
>test1 : number
>globalThis : typeof globalThis
declare let test2: (typeof globalThis)['y'] // error
>test2 : any
>globalThis : typeof globalThis
declare let test3: (typeof globalThis)['z'] // error
>test3 : any
>globalThis : typeof globalThis
declare let themAll: keyof typeof globalThis
>themAll : "undefined" | "x" | "globalThis" | "eval" | "parseInt" | "parseFloat" | "isNaN" | "isFinite" | "decodeURI" | "decodeURIComponent" | "encodeURI" | "encodeURIComponent" | "escape" | "unescape" | "NaN" | "Infinity" | "Object" | "Function" | "String" | "Boolean" | "Number" | "Math" | "Date" | "RegExp" | "Error" | "EvalError" | "RangeError" | "ReferenceError" | "SyntaxError" | "TypeError" | "URIError" | "JSON" | "Array" | "ArrayBuffer" | "DataView" | "Int8Array" | "Uint8Array" | "Uint8ClampedArray" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float32Array" | "Float64Array" | "Intl" | "alert" | "blur" | "cancelIdleCallback" | "captureEvents" | "close" | "confirm" | "focus" | "getComputedStyle" | "getSelection" | "matchMedia" | "moveBy" | "moveTo" | "open" | "postMessage" | "print" | "prompt" | "releaseEvents" | "requestIdleCallback" | "resizeBy" | "resizeTo" | "scroll" | "scrollBy" | "scrollTo" | "stop" | "toString" | "dispatchEvent" | "cancelAnimationFrame" | "requestAnimationFrame" | "atob" | "btoa" | "clearInterval" | "clearTimeout" | "createImageBitmap" | "fetch" | "queueMicrotask" | "setInterval" | "setTimeout" | "addEventListener" | "removeEventListener" | "NodeFilter" | "AbortController" | "AbortSignal" | "AbstractRange" | "AnalyserNode" | "Animation" | "AnimationEffect" | "AnimationEvent" | "AnimationPlaybackEvent" | "AnimationTimeline" | "Attr" | "AudioBuffer" | "AudioBufferSourceNode" | "AudioContext" | "AudioDestinationNode" | "AudioListener" | "AudioNode" | "AudioParam" | "AudioParamMap" | "AudioProcessingEvent" | "AudioScheduledSourceNode" | "AudioWorklet" | "AudioWorkletNode" | "AuthenticatorAssertionResponse" | "AuthenticatorAttestationResponse" | "AuthenticatorResponse" | "BarProp" | "BaseAudioContext" | "BeforeUnloadEvent" | "BiquadFilterNode" | "Blob" | "BlobEvent" | "BroadcastChannel" | "ByteLengthQueuingStrategy" | "CDATASection" | "CSSAnimation" | "CSSConditionRule" | "CSSCounterStyleRule" | "CSSFontFaceRule" | "CSSGroupingRule" | "CSSImportRule" | "CSSKeyframeRule" | "CSSKeyframesRule" | "CSSMediaRule" | "CSSNamespaceRule" | "CSSPageRule" | "CSSRule" | "CSSRuleList" | "CSSStyleDeclaration" | "CSSStyleRule" | "CSSStyleSheet" | "CSSSupportsRule" | "CSSTransition" | "Cache" | "CacheStorage" | "CanvasGradient" | "CanvasPattern" | "CanvasRenderingContext2D" | "ChannelMergerNode" | "ChannelSplitterNode" | "CharacterData" | "Clipboard" | "ClipboardEvent" | "ClipboardItem" | "CloseEvent" | "Comment" | "CompositionEvent" | "ConstantSourceNode" | "ConvolverNode" | "CountQueuingStrategy" | "Credential" | "CredentialsContainer" | "Crypto" | "CryptoKey" | "CustomElementRegistry" | "CustomEvent" | "DOMException" | "DOMImplementation" | "DOMMatrix" | "SVGMatrix" | "WebKitCSSMatrix" | "DOMMatrixReadOnly" | "DOMParser" | "DOMPoint" | "SVGPoint" | "DOMPointReadOnly" | "DOMQuad" | "DOMRect" | "SVGRect" | "DOMRectList" | "DOMRectReadOnly" | "DOMStringList" | "DOMStringMap" | "DOMTokenList" | "DataTransfer" | "DataTransferItem" | "DataTransferItemList" | "DelayNode" | "DeviceMotionEvent" | "DeviceOrientationEvent" | "Document" | "DocumentFragment" | "DocumentTimeline" | "DocumentType" | "DragEvent" | "DynamicsCompressorNode" | "Element" | "ElementInternals" | "ErrorEvent" | "Event" | "EventSource" | "EventTarget" | "External" | "File" | "FileList" | "FileReader" | "FileSystem" | "FileSystemDirectoryEntry" | "FileSystemDirectoryReader" | "FileSystemEntry" | "FileSystemFileEntry" | "FocusEvent" | "FontFace" | "FontFaceSet" | "FontFaceSetLoadEvent" | "FormData" | "FormDataEvent" | "GainNode" | "Gamepad" | "GamepadButton" | "GamepadEvent" | "GamepadHapticActuator" | "Geolocation" | "GeolocationCoordinates" | "GeolocationPosition" | "GeolocationPositionError" | "HTMLAllCollection" | "HTMLAnchorElement" | "HTMLAreaElement" | "HTMLAudioElement" | "HTMLBRElement" | "HTMLBaseElement" | "HTMLBodyElement" | "HTMLButtonElement" | "HTMLCanvasElement" | "HTMLCollection" | "HTMLDListElement" | "HTMLDataElement" | "HTMLDataListElement" | "HTMLDetailsElement" | "HTMLDirectoryElement" | "HTMLDivElement" | "HTMLDocument" | "HTMLElement" | "HTMLEmbedElement" | "HTMLFieldSetElement" | "HTMLFontElement" | "HTMLFormControlsCollection" | "HTMLFormElement" | "HTMLFrameElement" | "HTMLFrameSetElement" | "HTMLHRElement" | "HTMLHeadElement" | "HTMLHeadingElement" | "HTMLHtmlElement" | "HTMLIFrameElement" | "HTMLImageElement" | "HTMLInputElement" | "HTMLLIElement" | "HTMLLabelElement" | "HTMLLegendElement" | "HTMLLinkElement" | "HTMLMapElement" | "HTMLMarqueeElement" | "HTMLMediaElement" | "HTMLMenuElement" | "HTMLMetaElement" | "HTMLMeterElement" | "HTMLModElement" | "HTMLOListElement" | "HTMLObjectElement" | "HTMLOptGroupElement" | "HTMLOptionElement" | "HTMLOptionsCollection" | "HTMLOutputElement" | "HTMLParagraphElement" | "HTMLParamElement" | "HTMLPictureElement" | "HTMLPreElement" | "HTMLProgressElement" | "HTMLQuoteElement" | "HTMLScriptElement" | "HTMLSelectElement" | "HTMLSlotElement" | "HTMLSourceElement" | "HTMLSpanElement" | "HTMLStyleElement" | "HTMLTableCaptionElement" | "HTMLTableCellElement" | "HTMLTableColElement" | "HTMLTableElement" | "HTMLTableRowElement" | "HTMLTableSectionElement" | "HTMLTemplateElement" | "HTMLTextAreaElement" | "HTMLTimeElement" | "HTMLTitleElement" | "HTMLTrackElement" | "HTMLUListElement" | "HTMLUnknownElement" | "HTMLVideoElement" | "HashChangeEvent" | "Headers" | "History" | "IDBCursor" | "IDBCursorWithValue" | "IDBDatabase" | "IDBFactory" | "IDBIndex" | "IDBKeyRange" | "IDBObjectStore" | "IDBOpenDBRequest" | "IDBRequest" | "IDBTransaction" | "IDBVersionChangeEvent" | "IIRFilterNode" | "IdleDeadline" | "ImageBitmap" | "ImageBitmapRenderingContext" | "ImageData" | "InputEvent" | "IntersectionObserver" | "IntersectionObserverEntry" | "KeyboardEvent" | "KeyframeEffect" | "Location" | "MathMLElement" | "MediaCapabilities" | "MediaDeviceInfo" | "MediaDevices" | "MediaElementAudioSourceNode" | "MediaEncryptedEvent" | "MediaError" | "MediaKeyMessageEvent" | "MediaKeySession" | "MediaKeyStatusMap" | "MediaKeySystemAccess" | "MediaKeys" | "MediaList" | "MediaMetadata" | "MediaQueryList" | "MediaQueryListEvent" | "MediaRecorder" | "MediaRecorderErrorEvent" | "MediaSession" | "MediaSource" | "MediaStream" | "MediaStreamAudioDestinationNode" | "MediaStreamAudioSourceNode" | "MediaStreamTrack" | "MediaStreamTrackEvent" | "MessageChannel" | "MessageEvent" | "MessagePort" | "MimeType" | "MimeTypeArray" | "MouseEvent" | "MutationEvent" | "MutationObserver" | "MutationRecord" | "NamedNodeMap" | "Navigator" | "NetworkInformation" | "Node" | "NodeIterator" | "NodeList" | "Notification" | "OfflineAudioCompletionEvent" | "OfflineAudioContext" | "OscillatorNode" | "OverconstrainedError" | "PageTransitionEvent" | "PannerNode" | "Path2D" | "PaymentMethodChangeEvent" | "PaymentRequest" | "PaymentRequestUpdateEvent" | "PaymentResponse" | "Performance" | "PerformanceEntry" | "PerformanceEventTiming" | "PerformanceMark" | "PerformanceMeasure" | "PerformanceNavigation" | "PerformanceNavigationTiming" | "PerformanceObserver" | "PerformanceObserverEntryList" | "PerformancePaintTiming" | "PerformanceResourceTiming" | "PerformanceServerTiming" | "PerformanceTiming" | "PeriodicWave" | "PermissionStatus" | "Permissions" | "PictureInPictureWindow" | "Plugin" | "PluginArray" | "PointerEvent" | "PopStateEvent" | "ProcessingInstruction" | "ProgressEvent" | "PromiseRejectionEvent" | "PublicKeyCredential" | "PushManager" | "PushSubscription" | "PushSubscriptionOptions" | "RTCCertificate" | "RTCDTMFSender" | "RTCDTMFToneChangeEvent" | "RTCDataChannel" | "RTCDataChannelEvent" | "RTCDtlsTransport" | "RTCIceCandidate" | "RTCIceTransport" | "RTCPeerConnection" | "RTCPeerConnectionIceErrorEvent" | "RTCPeerConnectionIceEvent" | "RTCRtpReceiver" | "RTCRtpSender" | "RTCRtpTransceiver" | "RTCSessionDescription" | "RTCStatsReport" | "RTCTrackEvent" | "RadioNodeList" | "Range" | "ReadableStream" | "ReadableStreamDefaultController" | "ReadableStreamDefaultReader" | "RemotePlayback" | "Request" | "ResizeObserver" | "ResizeObserverEntry" | "ResizeObserverSize" | "Response" | "SVGAElement" | "SVGAngle" | "SVGAnimateElement" | "SVGAnimateMotionElement" | "SVGAnimateTransformElement" | "SVGAnimatedAngle" | "SVGAnimatedBoolean" | "SVGAnimatedEnumeration" | "SVGAnimatedInteger" | "SVGAnimatedLength" | "SVGAnimatedLengthList" | "SVGAnimatedNumber" | "SVGAnimatedNumberList" | "SVGAnimatedPreserveAspectRatio" | "SVGAnimatedRect" | "SVGAnimatedString" | "SVGAnimatedTransformList" | "SVGAnimationElement" | "SVGCircleElement" | "SVGClipPathElement" | "SVGComponentTransferFunctionElement" | "SVGDefsElement" | "SVGDescElement" | "SVGElement" | "SVGEllipseElement" | "SVGFEBlendElement" | "SVGFEColorMatrixElement" | "SVGFEComponentTransferElement" | "SVGFECompositeElement" | "SVGFEConvolveMatrixElement" | "SVGFEDiffuseLightingElement" | "SVGFEDisplacementMapElement" | "SVGFEDistantLightElement" | "SVGFEDropShadowElement" | "SVGFEFloodElement" | "SVGFEFuncAElement" | "SVGFEFuncBElement" | "SVGFEFuncGElement" | "SVGFEFuncRElement" | "SVGFEGaussianBlurElement" | "SVGFEImageElement" | "SVGFEMergeElement" | "SVGFEMergeNodeElement" | "SVGFEMorphologyElement" | "SVGFEOffsetElement" | "SVGFEPointLightElement" | "SVGFESpecularLightingElement" | "SVGFESpotLightElement" | "SVGFETileElement" | "SVGFETurbulenceElement" | "SVGFilterElement" | "SVGForeignObjectElement" | "SVGGElement" | "SVGGeometryElement" | "SVGGradientElement" | "SVGGraphicsElement" | "SVGImageElement" | "SVGLength" | "SVGLengthList" | "SVGLineElement" | "SVGLinearGradientElement" | "SVGMPathElement" | "SVGMarkerElement" | "SVGMaskElement" | "SVGMetadataElement" | "SVGNumber" | "SVGNumberList" | "SVGPathElement" | "SVGPatternElement" | "SVGPointList" | "SVGPolygonElement" | "SVGPolylineElement" | "SVGPreserveAspectRatio" | "SVGRadialGradientElement" | "SVGRectElement" | "SVGSVGElement" | "SVGScriptElement" | "SVGSetElement" | "SVGStopElement" | "SVGStringList" | "SVGStyleElement" | "SVGSwitchElement" | "SVGSymbolElement" | "SVGTSpanElement" | "SVGTextContentElement" | "SVGTextElement" | "SVGTextPathElement" | "SVGTextPositioningElement" | "SVGTitleElement" | "SVGTransform" | "SVGTransformList" | "SVGUnitTypes" | "SVGUseElement" | "SVGViewElement" | "Screen" | "ScreenOrientation" | "ScriptProcessorNode" | "SecurityPolicyViolationEvent" | "Selection" | "ServiceWorker" | "ServiceWorkerContainer" | "ServiceWorkerRegistration" | "ShadowRoot" | "SharedWorker" | "SourceBuffer" | "SourceBufferList" | "SpeechRecognitionAlternative" | "SpeechRecognitionResult" | "SpeechRecognitionResultList" | "SpeechSynthesis" | "SpeechSynthesisErrorEvent" | "SpeechSynthesisEvent" | "SpeechSynthesisUtterance" | "SpeechSynthesisVoice" | "StaticRange" | "StereoPannerNode" | "Storage" | "StorageEvent" | "StorageManager" | "StyleSheet" | "StyleSheetList" | "SubmitEvent" | "SubtleCrypto" | "Text" | "TextDecoder" | "TextDecoderStream" | "TextEncoder" | "TextEncoderStream" | "TextMetrics" | "TextTrack" | "TextTrackCue" | "TextTrackCueList" | "TextTrackList" | "TimeRanges" | "Touch" | "TouchEvent" | "TouchList" | "TrackEvent" | "TransformStream" | "TransformStreamDefaultController" | "TransitionEvent" | "TreeWalker" | "UIEvent" | "URL" | "webkitURL" | "URLSearchParams" | "VTTCue" | "VTTRegion" | "ValidityState" | "VideoPlaybackQuality" | "VisualViewport" | "WaveShaperNode" | "WebGL2RenderingContext" | "WebGLActiveInfo" | "WebGLBuffer" | "WebGLContextEvent" | "WebGLFramebuffer" | "WebGLProgram" | "WebGLQuery" | "WebGLRenderbuffer" | "WebGLRenderingContext" | "WebGLSampler" | "WebGLShader" | "WebGLShaderPrecisionFormat" | "WebGLSync" | "WebGLTexture" | "WebGLTransformFeedback" | "WebGLUniformLocation" | "WebGLVertexArrayObject" | "WebSocket" | "WheelEvent" | "Window" | "Worker" | "Worklet" | "WritableStream" | "WritableStreamDefaultController" | "WritableStreamDefaultWriter" | "XMLDocument" | "XMLHttpRequest" | "XMLHttpRequestEventTarget" | "XMLHttpRequestUpload" | "XMLSerializer" | "XPathEvaluator" | "XPathExpression" | "XPathResult" | "XSLTProcessor" | "console" | "CSS" | "WebAssembly" | "Audio" | "Image" | "Option" | "clientInformation" | "closed" | "customElements" | "devicePixelRatio" | "document" | "event" | "external" | "frameElement" | "frames" | "history" | "innerHeight" | "innerWidth" | "length" | "location" | "locationbar" | "menubar" | "navigator" | "ondevicemotion" | "ondeviceorientation" | "onorientationchange" | "opener" | "orientation" | "outerHeight" | "outerWidth" | "pageXOffset" | "pageYOffset" | "parent" | "personalbar" | "screen" | "screenLeft" | "screenTop" | "screenX" | "screenY" | "scrollX" | "scrollY" | "scrollbars" | "self" | "speechSynthesis" | "status" | "statusbar" | "toolbar" | "top" | "visualViewport" | "window" | "onabort" | "onanimationcancel" | "onanimationend" | "onanimationiteration" | "onanimationstart" | "onauxclick" | "onblur" | "oncanplay" | "oncanplaythrough" | "onchange" | "onclick" | "onclose" | "oncontextmenu" | "oncuechange" | "ondblclick" | "ondrag" | "ondragend" | "ondragenter" | "ondragleave" | "ondragover" | "ondragstart" | "ondrop" | "ondurationchange" | "onemptied" | "onended" | "onerror" | "onfocus" | "onformdata" | "ongotpointercapture" | "oninput" | "oninvalid" | "onkeydown" | "onkeypress" | "onkeyup" | "onload" | "onloadeddata" | "onloadedmetadata" | "onloadstart" | "onlostpointercapture" | "onmousedown" | "onmouseenter" | "onmouseleave" | "onmousemove" | "onmouseout" | "onmouseover" | "onmouseup" | "onpause" | "onplay" | "onplaying" | "onpointercancel" | "onpointerdown" | "onpointerenter" | "onpointerleave" | "onpointermove" | "onpointerout" | "onpointerover" | "onpointerup" | "onprogress" | "onratechange" | "onreset" | "onresize" | "onscroll" | "onseeked" | "onseeking" | "onselect" | "onselectionchange" | "onselectstart" | "onstalled" | "onsubmit" | "onsuspend" | "ontimeupdate" | "ontoggle" | "ontouchcancel" | "ontouchend" | "ontouchmove" | "ontouchstart" | "ontransitioncancel" | "ontransitionend" | "ontransitionrun" | "ontransitionstart" | "onvolumechange" | "onwaiting" | "onwebkitanimationend" | "onwebkitanimationiteration" | "onwebkitanimationstart" | "onwebkittransitionend" | "onwheel" | "onafterprint" | "onbeforeprint" | "onbeforeunload" | "ongamepadconnected" | "ongamepaddisconnected" | "onhashchange" | "onlanguagechange" | "onmessage" | "onmessageerror" | "onoffline" | "ononline" | "onpagehide" | "onpageshow" | "onpopstate" | "onrejectionhandled" | "onstorage" | "onunhandledrejection" | "onunload" | "localStorage" | "caches" | "crossOriginIsolated" | "crypto" | "indexedDB" | "isSecureContext" | "origin" | "performance" | "sessionStorage" | "importScripts" | "ActiveXObject" | "WScript" | "WSH" | "Enumerator" | "VBArray"
>globalThis : typeof globalThis