Util
Crystal via ModuleScript
Crystal comes with a few utility modules. If Crystal is being used from the packaged
ModuleScript, then the best way to access these modules is via require(Crystal.Util.PACKAGE)
.
The following modules are available:
Crystal.Util.Comm
Crystal.Util.Component
Crystal.Util.EnumList
Crystal.Util.Input
Crystal.Util.Option
Crystal.Util.Signal
Crystal.Util.Streamable
Crystal.Util.TableUtil
Crystal.Util.Timer
Crystal.Util.Trove
Crystal.Util.Promise
Below is an example of the Signal class being used in a service:
local Signal = require(Crystal.Util.Signal)
local MyService = Crystal.CreateService {
Name = "MyService",
SomeSignal = Signal.new(),
}