#Visual studio code automatic typing

1 messages · Page 1 of 1 (latest)

cerulean flicker
#

How to turn automatic typing on in visual studio code

marsh lynx
#

is it always automatic? I can't remember if it is ever automatic because I usually only use it to describe functions and stuff lol but give it a looksie

cerulean flicker
manic kestrelBOT
#

studio** You are now Level 4! **studio

marsh lynx
#

but if you are just adding a traditional module (with annotations or not) that you will require directly, then no

cerulean flicker
cerulean flicker
#

is working rn but it giving error like undefine variable like task, workspace etc.

marsh lynx
#

it does not allow typing luau types, but it does allow types

#
-- some comment
---@class SomeClass
---@field Yo integer
local SomeClass = {}
SomeClass.__index = SomeClass

-- Create a new SomeClass instance.
---@return SomeClass
function SomeClass.new()
  return setmetatable({Yo = 69}, SomeClass)
end

for example

cerulean flicker
#

It's giving this error. It super annoy. ik i will still work

cerulean flicker
marsh lynx
cerulean flicker
#

do i have to manually add item to gobal variable?

marsh lynx
#

but if you're like actually looking to do this for luau typing (not lua), why not just use roblox