Using strict type checking doesn't display warnings in the Script Warning/Error window
--!strict
local function add(a: number, b: number): number
return a + b
end
local result1: number = add(3, 4) -- Should work fine
local result2: number = add("3", 4) -- Should trigger a type error in strict mode
This code in Luau/Roblox displays this warning:
Type Error: (8,29) Type 'string' could not be converted into 'number'