/* * Copyright (C) 2023 Riyyi * * SPDX-License-Identifier: MIT */ #pragma once #include template inline bool is(U& input) { if constexpr (requires { input.template fastIs(); }) { return input.template fastIs(); } return typeid(input) == typeid(T); } template inline bool is(U* input) { return input && is(*input); } // serenity/AK/TypeCasts.h // serenity/Userland/Libraries/LibJS/AST.h