AggregateErrorConstructor.h 694 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibJS/Runtime/NativeFunction.h>
  8. namespace JS {
  9. class AggregateErrorConstructor final : public NativeFunction {
  10. JS_OBJECT(AggregateErrorConstructor, NativeFunction);
  11. public:
  12. explicit AggregateErrorConstructor(Realm&);
  13. virtual void initialize(Realm&) override;
  14. virtual ~AggregateErrorConstructor() override = default;
  15. virtual ThrowCompletionOr<Value> call() override;
  16. virtual ThrowCompletionOr<Object*> construct(FunctionObject& new_target) override;
  17. private:
  18. virtual bool has_constructor() const override { return true; }
  19. };
  20. }