mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-04 02:40:53 +01:00
Improves the type of `os.date` based on its documentation https://create.roblox.com/docs/reference/engine/libraries/os#date We know that the DateTypeResult table is only returned when the format string is either "*t" or "!*t", and otherwise its just a formatted string. This changes the type to showcase this appropriately. I put the more strict type first in the overload because the ordering makes a difference Note: the API docs used in studio (https://github.com/MaximumADHD/Roblox-Client-Tracker/blob/roblox/api-docs/en-us.json) may need to be updated to reflect the overloaded type instead.  It may be possible to add a lint of this too to provide analysis similar to how `string.format` works with a FormatString error. Will leave that for a different PR though |
||
---|---|---|
.. | ||
include/Luau | ||
src |