Skip to content

is there a way to query the type of an unannotated funcion? #1148

Discussion options

You must be logged in to vote

Yes, but it requires C++ code to access the type checker's result in the general case. If you just want to see it for debugging purposes, the luau-analyze CLI tool has a --annotate flag you can pass that will print the analyzed source to stdout with type annotations attached. These type annotations are not necessarily valid Luau source code, but they do show the actual types we inferred.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@capfredf
Comment options

Answer selected by capfredf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants