You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
' Makes sure the value supplied is a promisefunctionensurePromise(valueasobject) asobjectreturnpromises.isPromise(value) ? value : promises.resolve(value)
end function
Currently the above transpiles to:
' Makes sure the value supplied is a promisefunctionpromises_ensurePromise(valueasobject) asobjectreturn (function(__bsCondition, promises, value)
if__bsConditionthenreturnvalueelsereturnpromises_resolve(value)
endif end function)(promises_isPromise(value), promises, value)
end function
This results in unused variable warnings such as:
BRIGHTSCRIPT: WARNING: unused variable 'promises' in anonymous function in promises.brs(133)
It should transpile as:
' Makes sure the value supplied is a promisefunctionpromises_ensurePromise(valueasobject) asobjectreturn (function(__bsCondition, value)
if__bsConditionthenreturnvalueelsereturnpromises_resolve(value)
endif end function)(promises_isPromise(value), value)
end function
The text was updated successfully, but these errors were encountered:
Currently the above transpiles to:
This results in unused variable warnings such as:
It should transpile as:
The text was updated successfully, but these errors were encountered: