Fixed typing for non-promises & added err typing
Fixed typing for non-promises & added err typing

Function works with thenable non-promises and returns an Error or a custom error type
scopsy/await-to-js,scopsy/await-to-js