Variable GlobalConst

Global: Function & {
    [key: string]: symbol;
} = ...

Type declaration

  • [key: string]: symbol

Description

Global symbols factory registry with namespaces

Example

import { Global } from '@biorate/symbolic';

console.log(Global.Test); // Symbol(Global.Test)
console.log(Global.Test === Global.Test); // true

// namespace usage
console.log(Global('Test').Test); // Symbol(Test.Test)
console.log(Global('Test').Test === Global('Test').Test); // true

console.log(Global('Test1').Test); // Symbol(Test1.Test)
console.log(Global('Test2').Test); // Symbol(Test2.Test)
console.log(Global('Test1').Test === Global('Test2').Test); // false

Generated using TypeDoc