// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details #pragma once #include "Luau/Type.h" #include "Luau/TypePack.h" #include "Luau/Variant.h" #include namespace Luau { const void* ptr(TypeOrPack ty); template, bool> = true> const T* get(const TypeOrPack& tyOrTp) { return tyOrTp.get_if(); } template, bool> = true> const T* get(const TypeOrPack& tyOrTp) { if (const TypeId* ty = get(tyOrTp)) return get(*ty); else return nullptr; } template, bool> = true> const T* get(const TypeOrPack& tyOrTp) { if (const TypePackId* tp = get(tyOrTp)) return get(*tp); else return nullptr; } TypeOrPack follow(TypeOrPack ty); } // namespace Luau