1
0
Fork 0
mirror of https://github.com/luau-lang/luau.git synced 2025-04-07 04:10:54 +01:00
luau/Analysis
nothing 9c198413ec
Analysis: Make typeof on a type userdata return "type" ()
This change introduces a flag (`LuauUserTypeFunTypeofReturnsType`) that,
when enabled, sets `__type` on the type userdata's metatable to "type".
This behaviour was described in the user-defined type function RFC
(https://rfcs.luau.org/user-defined-type-functions.html), but seems to
have been missed; this change implements that behaviour.

Currently this does not change `typeof(t) == 'type'` emitting an unknown
type warning as I don't trust myself to implement it due to my general
lack of C++ knowledge; this can be worked on later.
2025-02-17 09:36:52 -08:00
..
include/Luau Sync to upstream/release/661 () 2025-02-14 13:57:46 -08:00
src Analysis: Make typeof on a type userdata return "type" () 2025-02-17 09:36:52 -08:00