@quenty/steputils 3.5.3 → 3.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.5.4](https://github.com/Quenty/NevermoreEngine/compare/@quenty/steputils@3.5.3...@quenty/steputils@3.5.4) (2025-04-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [3.5.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/steputils@3.5.2...@quenty/steputils@3.5.3) (2025-03-21)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/steputils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/steputils",
3
- "version": "3.5.3",
3
+ "version": "3.5.4",
4
4
  "description": "Binds animations into step, where the animation only runs as needed",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "6b7c3e15e60cdb185986207b574e2b5591261e7a"
30
+ "gitHead": "78c3ac0ab08dd18085b6e6e6e4f745e76ed99f68"
31
31
  }
@@ -1,3 +1,4 @@
1
+ --!strict
1
2
  --[=[
2
3
  Utility functions primarily used to bind animations into update loops of the Roblox engine.
3
4
  @class StepUtils
@@ -35,14 +36,14 @@ local StepUtils = {}
35
36
  @return (...) -> () -- Connect function
36
37
  @return () -> () -- Disconnect function
37
38
  ]=]
38
- function StepUtils.bindToRenderStep(update)
39
+ function StepUtils.bindToRenderStep(update: () -> boolean): () -> ()
39
40
  return StepUtils.bindToSignal(RunService.RenderStepped, update)
40
41
  end
41
42
 
42
43
  --[=[
43
44
  Yields until the frame deferral is done
44
45
  ]=]
45
- function StepUtils.deferWait()
46
+ function StepUtils.deferWait(): ()
46
47
  local current = coroutine.running()
47
48
  task.defer(task.spawn, current)
48
49
  coroutine.yield()
@@ -60,7 +61,7 @@ end
60
61
  @return (...) -> () -- Connect function
61
62
  @return () -> () -- Disconnect function
62
63
  ]=]
63
- function StepUtils.bindToStepped(update)
64
+ function StepUtils.bindToStepped(update: () -> boolean): () -> ()
64
65
  return StepUtils.bindToSignal(RunService.Stepped, update)
65
66
  end
66
67
 
@@ -73,7 +74,7 @@ end
73
74
  @return (...) -> () -- Connect function
74
75
  @return () -> () -- Disconnect function
75
76
  ]=]
76
- function StepUtils.bindToSignal(signal, update)
77
+ function StepUtils.bindToSignal(signal: RBXScriptSignal, update: () -> boolean): (() -> (), () -> ())
77
78
  if typeof(signal) ~= "RBXScriptSignal" then
78
79
  error("signal must be of type RBXScriptSignal")
79
80
  end
@@ -81,7 +82,7 @@ function StepUtils.bindToSignal(signal, update)
81
82
  error(string.format("update must be of type function, got %q", type(update)))
82
83
  end
83
84
 
84
- local conn = nil
85
+ local conn: RBXScriptConnection? = nil
85
86
  local function disconnect()
86
87
  if conn then
87
88
  conn:Disconnect()
@@ -127,7 +128,7 @@ end
127
128
  @param func function -- Function to call
128
129
  @return function -- Call this function to cancel call
129
130
  ]=]
130
- function StepUtils.onceAtRenderPriority(priority: number, func)
131
+ function StepUtils.onceAtRenderPriority(priority: number, func: () -> ()): () -> ()
131
132
  assert(type(priority) == "number", "Bad priority")
132
133
  assert(type(func) == "function", "Bad func")
133
134
 
@@ -163,7 +164,7 @@ end
163
164
  @param func function -- Function to call
164
165
  @return function -- Call this function to cancel call
165
166
  ]=]
166
- function StepUtils.onceAtStepped(func)
167
+ function StepUtils.onceAtStepped(func: () -> ()): () -> ()
167
168
  local conn = RunService.Stepped:Once(func)
168
169
  return function()
169
170
  conn:Disconnect()
@@ -181,7 +182,7 @@ end
181
182
  @param func function -- Function to call
182
183
  @return function -- Call this function to cancel call
183
184
  ]=]
184
- function StepUtils.onceAtRenderStepped(func)
185
+ function StepUtils.onceAtRenderStepped(func: () -> ()): () -> ()
185
186
  local conn = RunService.RenderStepped:Once(func)
186
187
  return function()
187
188
  conn:Disconnect()
@@ -196,10 +197,10 @@ end
196
197
  @param func function -- Function to call
197
198
  @return function -- Call this function to cancel call
198
199
  ]=]
199
- function StepUtils.onceAtEvent(event, func)
200
+ function StepUtils.onceAtEvent(event: RBXScriptSignal, func: () -> ()): () -> ()
200
201
  assert(type(func) == "function", "Bad func")
201
202
 
202
- local conn
203
+ local conn: RBXScriptConnection?
203
204
  local function cleanup()
204
205
  if conn then
205
206
  conn:Disconnect()
@@ -1,3 +1,4 @@
1
+ --!strict
1
2
  --[=[
2
3
  Executes code at a specific point in render step priority queue
3
4
  @class onRenderStepFrame
@@ -14,7 +15,7 @@ local HttpService = game:GetService("HttpService")
14
15
  @within onRenderStepFrame
15
16
  ]=]
16
17
 
17
- return function(priority, callback)
18
+ return function(priority: number, callback: () -> ()): () -> ()
18
19
  assert(type(priority) == "number", "Bad priority")
19
20
  assert(type(callback) == "function", "Bad callback")
20
21
 
@@ -1,3 +1,4 @@
1
+ --!strict
1
2
  --[=[
2
3
  Executes code at a specific point in Roblox's engine
3
4
  @class onSteppedFrame
@@ -12,7 +13,7 @@ local RunService = game:GetService("RunService")
12
13
  @return RBXScriptConnection
13
14
  @within onSteppedFrame
14
15
  ]=]
15
- return function(func)
16
+ return function(func: () -> ())
16
17
  assert(type(func) == "function", "Bad func")
17
18
 
18
19
  return RunService.Stepped:Once(func)