function Subscription.new(f,S,v,h)assert(type(f)=="\102\117\110\099\116\105\111\110"or f==nil,"\066\097\100 \102\105\114\101\067\097\108\108\098\097\099\107")assert(type(S)=="\102\117\110\099\116\105\111\110"or S==nil,"\066\097\100 \102\097\105\108\067\097\108\108\098\097\099\107")assert(type(v)=="\102\117\110\099\116\105\111\110"or v==nil,"\066\097\100 \099\111\109\112\108\101\116\101\067\097\108\108\098\097\099\107")return setmetatable({_state=stateTypes.PENDING,_source=ENABLE_STACK_TRACING and debug.traceback()or"",_fireCallback=f,_failCallback=S,_completeCallback=v,_onSubscribe=h},Subscription)end

function Subscription.new(fireCallback, failCallback, completeCallback, onSubscribe)
	assert(type(fireCallback) == "function" or fireCallback == nil, "Bad fireCallback")
	assert(type(failCallback) == "function" or failCallback == nil, "Bad failCallback")
	assert(type(completeCallback) == "function" or completeCallback == nil, "Bad completeCallback")

	return setmetatable({
		_state = stateTypes.PENDING;
		_source = ENABLE_STACK_TRACING and debug.traceback() or "";
		_fireCallback = fireCallback;
		_failCallback = failCallback;
		_completeCallback = completeCallback;
		_onSubscribe = onSubscribe;
	}, Subscription)
end
