Skip to content

Commit 7843dfa

Browse files
committed
docs: improved docs by fixing inconsistencies and reordering doc tags
1 parent 29e2319 commit 7843dfa

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,4 @@ Uh..
2626

2727
> "Your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should."
2828
29-
Realistically, it is oftentimes better to use an actual signal implementation, such as [FastSignal](https://github.com/RBLXUtils/FastSignal), especially if you want to get around the [limitations](https://create.roblox.com/docs/scripting/events/bindable#argument-limitations) imposed by traditional BindableEvents.
30-
29+
Realistically, it is oftentimes better to use an actual signal implementation, such as [RbxUtil's Signal](https://sleitnick.github.io/RbxUtil/api/Signal) or [FastSignal](https://github.com/RBLXUtils/FastSignal), especially if you want to get around the [limitations](https://create.roblox.com/docs/scripting/events/bindable#argument-limitations) imposed by traditional BindableEvents.

src/init.luau

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
--[=[
2-
@class BindableEventWrapper
3-
42
A wrapper around a [BindableEvent] that exposes a similar API to that of a normal signal library.
53
64
Please note that this has the same [limitations](https://create.roblox.com/docs/scripting/events/bindable#argument-limitations) as a regular BindableEvent.
@@ -14,25 +12,27 @@
1412
1513
foodEaten:Fire("Jerry")
1614
```
15+
16+
@class BindableEventWrapper
1717
]=]
1818
local BindableEventWrapper = {}
1919
BindableEventWrapper.__index = BindableEventWrapper
2020

2121
type BindableEventWrapper = typeof(setmetatable({} :: {}, BindableEventWrapper))
2222

2323
--[=[
24+
The underlying bindable event used by the class
25+
2426
@prop _internal BindableEvent
2527
@private
2628
@within BindableEventWrapper
27-
28-
The underlying bindable event used by the class
2929
]=]
3030

3131
--[=[
32+
Instantiates a new BindableEventWrapper.
33+
3234
@within BindableEventWrapper
3335
@param event BindableEvent? -- If this is not nil, the wrapper will wrap the provided [BindableEvent] instead of creating a new one.
34-
35-
Instantiates a new BindableEventWrapper.
3636
]=]
3737
function BindableEventWrapper.new(event: BindableEvent?)
3838
assert(
@@ -55,22 +55,22 @@ function BindableEventWrapper.new(event: BindableEvent?)
5555
end
5656

5757
--[=[
58-
@within BindableEventWrapper
59-
6058
Fires the internal [BindableEvent].
6159
6260
See [BindableEvent:Fire]
61+
62+
@within BindableEventWrapper
6363
]=]
6464
function BindableEventWrapper.Fire(self: BindableEventWrapper, ...: any)
6565
self._inner:Fire(...)
6666
end
6767

6868
--[=[
69-
@within BindableEventWrapper
70-
71-
Connects to the internal [BindableEvent's Event](https://create.roblox.com/docs/reference/engine/classes/BindableEvent#Event) and returns the [RBXScriptConnection](https://create.roblox.com/docs/reference/engine/datatypes/RBXScriptConnection) representing it.
69+
Connects to the internal [BindableEvent's Event](https://create.roblox.com/docs/reference/engine/classes/BindableEvent#Event) and returns the [RBXScriptConnection] representing it.
7270
7371
See [RBXScriptSignal:Connect]
72+
73+
@within BindableEventWrapper
7474
]=]
7575
function BindableEventWrapper.Connect(
7676
self: BindableEventWrapper,
@@ -80,9 +80,9 @@ function BindableEventWrapper.Connect(
8080
end
8181

8282
--[=[
83-
@within BindableEventWrapper
84-
8583
See [RBXScriptSignal:ConnectParallel]
84+
85+
@within BindableEventWrapper
8686
]=]
8787
function BindableEventWrapper.ConnectParallel(
8888
self: BindableEventWrapper,
@@ -92,11 +92,11 @@ function BindableEventWrapper.ConnectParallel(
9292
end
9393

9494
--[=[
95-
@within BindableEventWrapper
96-
97-
Connects to the [internal BindableEvent's Event](https://create.roblox.com/docs/reference/engine/classes/BindableEvent#Event) such that the connection is disconnected after the first event is delivered. Returns the [RBXScriptConnection](https://create.roblox.com/docs/reference/engine/datatypes/RBXScriptConnection) representing the connection.
95+
Connects to the internal [BindableEvent's Event](https://create.roblox.com/docs/reference/engine/classes/BindableEvent#Event) such that the connection is disconnected after the first event is delivered. Returns the [RBXScriptConnection](https://create.roblox.com/docs/reference/engine/datatypes/RBXScriptConnection) representing the connection.
9896
9997
See [RBXScriptSignal:Once]
98+
99+
@within BindableEventWrapper
100100
]=]
101101
function BindableEventWrapper.Once(
102102
self: BindableEventWrapper,
@@ -106,12 +106,12 @@ function BindableEventWrapper.Once(
106106
end
107107

108108
--[=[
109-
@within BindableEventWrapper
110-
@yields
111-
112109
Yields until the internal [BindableEvent's Event](https://create.roblox.com/docs/reference/engine/classes/BindableEvent#Event) fires. Returns the arguments provided by the signal.
113110
114111
See [RBXScriptSignal:Wait]
112+
113+
@within BindableEventWrapper
114+
@yields
115115
]=]
116116
function BindableEventWrapper.Wait(self: BindableEventWrapper): ...any
117117
return self._inner.Event:Wait()

0 commit comments

Comments
 (0)