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
Now obviously, functions should never get passed to the jsii kernel to serialize, so this is already a bug. But if they do:
jsii.errors.JavaScriptError:
Error: Resolution error: JSII kernel assumption violated, undefined is not an object.
Upon reading this error message you'll tear out your hair trying to figure out how this is possible, because no code path looks like it should allow undefined at that point.
🐛 Bug Report
Now obviously, functions should never get passed to the jsii kernel to serialize, so this is already a bug. But if they do:
Upon reading this error message you'll tear out your hair trying to figure out how this is possible, because no code path looks like it should allow
undefined
at that point.This is because:
Thanks JavaScript!
Anyway, explicitly testing for functions using
typeof value === 'function'
and throwing a more appropriate error message would be VERY VERY helpful.The text was updated successfully, but these errors were encountered: