Documentación offline JavaScript main

AsyncDisposableStack.prototype.disposed

main Documentación oficial Licencia CC-BY-SA-2.5Descargado el 2026-08-02

En esta página

The disposed accessor property of {{jsxref("AsyncDisposableStack")}} instances returns a boolean indicating whether or not this AsyncDisposableStack has been disposed or moved by doing any of the following:

  • Calling its {{jsxref("AsyncDisposableStack/disposeAsync", "disposeAsync()")}} method
  • Calling its {{jsxref("AsyncDisposableStack/move", "move()")}} method
  • Declaring it with {{jsxref("Statements/await_using", "await using")}} and letting the variable go out of scope, which automatically calls the [Symbol.asyncDispose]() method.

Examples#

Checking if a stack is disposed#

const disposer = new AsyncDisposableStack();
console.log(disposer.disposed); // false
await disposer.disposeAsync();
console.log(disposer.disposed); // true

Specifications#

{{Specifications}}

Browser compatibility#

{{Compat}}

See also#