Add type annotations to the Luau variant of module#2
Add type annotations to the Luau variant of module#2Dekkonot wants to merge 1 commit intoRiskoZS:mainfrom
Conversation
|
I can see Luau having a hard time with Annotating the return type as |
|
It also looks like Luau needs a bit of help on line 71 with determining that |
|
|
||
|
|
||
| local function expandBuffer(out, maxLen) | ||
| local function expandBuffer(out: buffer, maxLen: number) |
There was a problem hiding this comment.
Annotating the return type as (buffer?, any) seems to appease the linter and is probably good enough
Luau has a type system which is used for both intellisense and in some cases native codegen instructions. This PR adds type annotations.
This omits adding return-type annotations to
expandBuffer. This is because this function actually can't really be represented by Luau's type type at the moment -- I believe this is a bug with Luau, but I will check with the maintainers. Regardless though, it's internal facing only so I think it's fine to leave without type annotations at the moment.