Type checking help?

Hello, I am trying to markup my code, and I’m trying to find some kind of documentation for the type checking, rather than an announcement. Can anyone help me out?

type ServiceProvider = {};

type Service = { 
	Provider : ServiceProvider;
};

module.GetService = function(s:string) : ServiceProvider
	return require(script:FindFirstChild(s));
end

I am trying to find out how to add a description to my types?
https://gyazo.com/e05f846feb10fab0e5092c8e903cf027

Also, I noticed on one of the posts about it, they implemented something so they can do
image
How do we also do this?

1 Like

I do not understand your question, please clarify it so I can help.

image
This list. How do we implement something like this ourselves? I remember seeing an update where they added something for it

You can position a ScrollingFrame every frame using the TextBounds properties and update it’s instances based on the best matches there are for the word that is currently being typed (Most likely detect it with the CursorPosition property of a TextBox).

There is an option in the beta features of Studio that you can enable. You also need to include either:

  • --!nocheck ,
  • --!nonstrict (default), and
  • --!strict
    at the top of your code as these dictate how the type checking operates. There is an option in the beta features to add this automatically.

The lua-u type checking info is here: Type checking - Luau