Works however if refined using an if condition
--!strict
local x = {} :: unknown
if typeof(x) == "table" then
-- Works:
-- if typeof(x.transform) == "function" then
-- local y = x.transform -- y correctly inferred as "function"
-- end
assert(typeof(x.transform) == "function") -- Type Error: (11,16) Type 'table' does not have key 'transform'
end