--[=[
	@param name string
	@param priority number
	@param fn (dt: number) -> nil
	Calls `RunService:BindToRenderStep` and registers a function in the
	Janitor that will call `RunService:UnbindFromRenderStep` on cleanup.

	```lua
	Janitor:BindToRenderStep("Test", Enum.RenderPriority.Last.Value, function(dt)
		-- Do something
	end)
	```
]=]

function Janitor:BindToRenderStep(name: string, priority: number, fn: (dt: number) -> nil)
	RunService:BindToRenderStep(name, priority, fn)
	self:Add(function()
		RunService:UnbindFromRenderStep(name)
	end)
end

