add jsdoc for static Promise methods
add tests for cast method