The name of the global object to get, may be any valid PropertyKey (string, number or symbol)
A new readonly ILazyValue instance which will lazily attempt to return the globally available named instance.
// This does not cause the evaluation to occur
window.myGlobal = "Hello";
let cachedValue = lazySafeGetInst("myGlobal");
// cachedValue.v === "Hello"
window.myGlobal = "Darkness";
// cachedValue.v === "Hello"
let promiseCls = lazySafeGetInst("Promise");
// null if Promise is not supported in the runtime
// otherwise the Promise class.
Create and return an readonly ILazyValue instance which will cache and return the named global value if available, will return
null
if the named global object is not available or if the runtime throws an exception when attempting to access the global object. Unlike getInst the value is cached after the first access, so if the global value changes after the initial fetch the original cached value is still returned.