Add variable definition for Promise doc. #1651

Closing #1651 with a proper variable declaration.