--[=[
	Initializes a new promise with the given function in a delay wrapper.

	@param seconds number
	@param func (resolve: (...) -> (), reject: (...) -> ()) -> ()?
	@return Promise<T>
]=]

function Promise.delay(seconds, func)
	assert(type(seconds) == "number", "Bad seconds")
	assert(type(func) == "function", "Bad func")

	local self = Promise.new()

	task.delay(seconds, func, self:_getResolveReject())

	return self
end
