Update Instance.new type analysis

As a developer, Instance.new returning any is preventing me from making properly-typed constructors.

local x = 'Frame'
local y = Instance.new(x) --> any

y should be interpreted as Frame here.

4 Likes

Has this ever worked? Instance.new to my knowledge is a magic function and doesn’t handle inputs properly on either typing engine.

V1 Typing Engine:
image

V2 Typing Engine:
image

(i know these are the same screenshot but trust me, its the same thing on both engines).

If you ask me, a lot of these functions that were defined magically properly dont need to be, Instance.new was obviously defined before string literals were properly implemented, and it hasn’t been updated to reflect that.

2 Likes