Util
Knit via Wally
When installing Knit with Wally, developers should pull in utility modules via Wally as required. Knit's utility modules are significantly slimmed down in the Wally release.
Knit via ModuleScript
Knit comes with a few utility modules. If Knit is being used from the packaged
ModuleScript, then the best way to access these modules is via require(Knit.Util.PACKAGE)
.
The following modules are available:
Knit.Util.Comm
Knit.Util.Component
Knit.Util.EnumList
Knit.Util.Input
Knit.Util.Option
Knit.Util.Signal
Knit.Util.Streamable
Knit.Util.TableUtil
Knit.Util.Timer
Knit.Util.Trove
Knit.Util.Promise
Below is an example of the Signal class being used in a service:
local Signal = require(Knit.Util.Signal)
local MyService = Knit.CreateService {
Name = "MyService",
SomeSignal = Signal.new(),
}