TypeTags .Global

Overview

Scripts running under Node.js have an object called global as their global object. In browsers, the top-level scope is the global scope. This means that within the browser var something will define a new global variable. In Node.js, the top-level scope is not the global scope; var something inside a Node.js module will be local to that module.

Usage

import { TypeTags } from 'typetags'
console.log(TypeTags.Global)
// → [object global]

Predicate

.isGlobal(value)

  • Checks if value is or has a default global type tag.
const { TypeTags } = require('typetags')
let tag = TypeTags.get(global)
TypeTags.isGlobal(tag)
// → true
TypeTags.isGlobal(global)
// → true

Metadata (TType)

MetadataValue
.typeGlobal
.tag[object Object]
.builtin()undefined
.getTag()[object Object]
.hasSpecialArgs()false
.instance()undefined
.instanceTypeOf()object
.info()see more
.isAvailable()true
.isConstructor()false
.isFactory()false
.isFunction()false
.isGlobal()false
.isIterator()false
.isNested()false
.isObject()true
.isPrimitive()false
.isStringifiable()false
.isSyntatic()false
.isTypedArray()false
.ownKeys()[global, clearInterval, clearTimeout, setInterval, setTimeout, Buffer, setImmediate, clearImmediate, ArrayBuffer, Uint8Array, URL, URLSearchParams, TextEncoder, TextDecoder, queueMicrotask, AbortController, process, console, afterAll, afterEach, beforeAll, beforeEach, describe, it, test, fdescribe, fit, xdescribe, xit, xtest, expect, Object, Function, Array, Number, parseFloat, parseInt, Infinity, NaN, undefined, Boolean, String, Symbol, Date, Promise, RegExp, Error, AggregateError, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError, globalThis, JSON, Math, Intl, Int8Array, Uint16Array, Int16Array, Uint32Array, Int32Array, Float32Array, Float64Array, Uint8ClampedArray, BigUint64Array, BigInt64Array, DataView, Map, BigInt, Set, WeakMap, WeakSet, Proxy, Reflect, FinalizationRegistry, WeakRef, decodeURI, decodeURIComponent, encodeURI, encodeURIComponent, escape, unescape, eval, isFinite, isNaN, SharedArrayBuffer, Atomics, WebAssembly, jest-symbol-do-not-touch]
.toString()function toString() { [native code] }
.typeOf()object

Signature

declare type ITypeTags = {
[key in Types | NestedTypes]: Tags
}
declare interface Predicate {
predicate(value: any): boolean
}

See MDN Web Docs