Better error reporting
Added console related stuff to the TypeScript definition