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
importowfrom'ow';constunicorn=input=>{ow(input,ow.string.minLength(5));};unicorn(3);// throws TypeError: Cannot read property 'minLength' of undefined
For now i am using this workaround (which is a bit ugly):
importowDefaultfrom"ow";// @ts-ignoreconstow=/** @type {import('ow').default} */(owDefault.default);constunicorn=(input)=>{ow(input,ow.string.minLength(5));};unicorn(3);// works as expected
The text was updated successfully, but these errors were encountered:
The export default doesn't seem to work correctly with esm and throws an error:
TypeError: Cannot read property 'minLength' of undefined
Reproduction Repo: https://github.com/SimonSiefke/ow-bug
For now i am using this workaround (which is a bit ugly):
The text was updated successfully, but these errors were encountered: