mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Correct string.match return type
This commit is contained in:
parent
4be8938ace
commit
447f427166
1 changed files with 2 additions and 1 deletions
|
@ -757,7 +757,8 @@ TypeId SingletonTypes::makeStringMetatable()
|
|||
{"gsub", {gsubFunc}},
|
||||
{"len", {makeFunction(*arena, stringType, {}, {}, {}, {}, {numberType})}},
|
||||
{"lower", {stringToStringType}},
|
||||
{"match", {makeFunction(*arena, stringType, {}, {}, {stringType, optionalNumber}, {}, {optionalString})}},
|
||||
{"match", {arena->addType(FunctionTypeVar{arena->addTypePack({stringType, stringType, optionalNumber}),
|
||||
arena->addTypePack(TypePackVar{VariadicTypePack{optionalString}})})}},
|
||||
{"rep", {makeFunction(*arena, stringType, {}, {}, {numberType}, {}, {stringType})}},
|
||||
{"reverse", {stringToStringType}},
|
||||
{"sub", {makeFunction(*arena, stringType, {}, {}, {numberType, optionalNumber}, {}, {stringType})}},
|
||||
|
|
Loading…
Add table
Reference in a new issue