Standard built-ins

Promise[Symbol.species]

Try the free JavaScript compiler

Accessor used by promise chaining to select a constructor for downstream results. The default getter returns the receiver constructor. Custom species can alter the type of derived promises.

Formal Syntax & Structure

javascript syntaxjavascript
Promise[Symbol.species]

Working Example

Example Snippetjavascript
class P extends Promise {} const p=P.resolve(1); console.log(p.then(x=>x) instanceof P);
JavaScript Reference