Skip to content

How to type a module that returns a string when required #628

Answered by icy-lava
catwell asked this question in Q&A
Discussion options

You must be logged in to vote

Late reply but - you're returning a type when you should be returning a value. So instead you can do something like return "anything" or return nil as string.

I don't know if there's a more standard way of doing this.

Could also do:

local version: string
return version

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@hishamhm
Comment options

@catwell
Comment options

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