Skip to content

Commit 2dc7779

Browse files
authored
Merge pull request #644 from Quenty/users/quenty/luau-typing
feat: Add SimpleEnum package and interface
2 parents bf52cf2 + d3040d7 commit 2dc7779

File tree

63 files changed

+450
-192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+450
-192
lines changed

games/integration/modules/Client/Button/LookAtButtonsClient.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ local LookAtButtonsClient = setmetatable({}, BaseObject)
2424
LookAtButtonsClient.ClassName = "LookAtButtonsClient"
2525
LookAtButtonsClient.__index = LookAtButtonsClient
2626

27-
function LookAtButtonsClient.new(humanoid, serviceBag: ServiceBag.ServiceBag)
27+
function LookAtButtonsClient.new(humanoid: Humanoid, serviceBag: ServiceBag.ServiceBag)
2828
local self = setmetatable(BaseObject.new(humanoid), LookAtButtonsClient)
2929

3030
self._serviceBag = assert(serviceBag, "No serviceBag")

plugins/preview-plugin/src/modules/Server/PreviewFinder.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function PreviewFinder:_setup()
4242
end
4343
end
4444

45-
function PreviewFinder:_setupParent(parent)
45+
function PreviewFinder:_setupParent(parent: Instance)
4646
local maid = Maid.new()
4747

4848
maid:GiveTask(parent.DescendantAdded:Connect(function(child)

pnpm-lock.yaml

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/acceltween/src/Shared/AccelTween.lua

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export type AccelTween = typeof(setmetatable(
6464
_y1: number,
6565
_a1: number,
6666
},
67-
{ __index = AccelTween }
67+
{} :: typeof({ __index = AccelTween })
6868
))
6969

7070
--[=[
@@ -99,6 +99,15 @@ function AccelTween.new(maxaccel: number?): AccelTween
9999
return self :: any
100100
end
101101

102+
function AccelTween.SetTarget(self: AccelTween, target: number, doNotAnimate: boolean?): ()
103+
self.t = target
104+
105+
if doNotAnimate then
106+
self.p = target
107+
self.v = 0
108+
end
109+
end
110+
102111
function AccelTween:__index(index)
103112
if AccelTween[index] then
104113
return AccelTween[index]

src/adorneedata/src/Shared/AdorneeDataValue.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ AdorneeDataValue.__index = AdorneeDataValue
3939
@param prototype table
4040
@return AdorneeDataValue<T>
4141
]=]
42-
function AdorneeDataValue.new(adornee, prototype)
42+
function AdorneeDataValue.new(adornee: Instance, prototype)
4343
assert(typeof(adornee) == "Instance", "Bad adornee")
4444
assert(type(prototype) == "table", "Bad prototype")
4545

src/bodycolorsutils/src/Shared/RxBodyColorsDataUtils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ local RxBodyColorsDataUtils = {}
1818
@param instance Instance
1919
@return Observable<BodyColorsData>
2020
]=]
21-
function RxBodyColorsDataUtils.observeFromAttributes(instance)
21+
function RxBodyColorsDataUtils.observeFromAttributes(instance: Instance)
2222
assert(typeof(instance) == "Instance", "Bad instance")
2323

2424
local observables = {}

src/boundlinkutils/src/Shared/BoundLinkCollection.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function BoundLinkCollection:HasClass(class)
5555
return self._classes[class] ~= nil
5656
end
5757

58-
function BoundLinkCollection:TrackParent(parent)
58+
function BoundLinkCollection:TrackParent(parent: Instance)
5959
assert(parent, "Bad parent")
6060

6161
self._maid:GiveTask(parent.ChildAdded:Connect(function(child)

src/buttondragmodel/src/Client/ButtonDragModel.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export type ButtonDragModel =
3333
_clampWithinButton: ValueObject.ValueObject<boolean>,
3434
_activePositions: { [InputObject | string]: Vector2? },
3535

36-
DragPositionChanged: Signal.Signal<Vector2>,
36+
DragPositionChanged: Signal.Signal<(Vector2?, Vector2?, ...any)>,
3737
IsDraggingChanged: Signal.Signal<boolean>,
3838
},
3939
{} :: typeof({ __index = ButtonDragModel })

src/chatproviderservice/src/Shared/Binders/HasChatTagsBase.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function HasChatTagsBase.new(player: Player): HasChatTagsBase
4040
return
4141
end
4242

43-
local tagDataList = brio:GetValue()
43+
local tagDataList: { ChatTagDataUtils.ChatTagData } = brio:GetValue()
4444
local maid = brio:ToMaid()
4545

4646
table.sort(tagDataList, function(a, b)

src/clienttranslator/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
],
3030
"dependencies": {
3131
"@quenty/blend": "workspace:*",
32+
"@quenty/enums": "workspace:*",
3233
"@quenty/instanceutils": "workspace:*",
3334
"@quenty/loader": "workspace:*",
3435
"@quenty/maid": "workspace:*",

0 commit comments

Comments
 (0)