Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit c3f26030
authored
Nov 13, 2014
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Add deprecation notice to eventemitter fcts on promise
1 parent
d7c0ba7a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
lib/promise.js
lib/promise.js
View file @
c3f2603
...
@@ -104,6 +104,8 @@ SequelizePromise.all = function (promises) {
...
@@ -104,6 +104,8 @@ SequelizePromise.all = function (promises) {
*
*
* @param {String} evt
* @param {String} evt
* @param {Function} fct
* @param {Function} fct
*
* @deprecated
*/
*/
Promise
.
prototype
.
on
=
function
(
evt
,
fct
)
{
Promise
.
prototype
.
on
=
function
(
evt
,
fct
)
{
if
(
evt
===
'success'
)
{
if
(
evt
===
'success'
)
{
...
@@ -123,6 +125,8 @@ Promise.prototype.on = function(evt, fct) {
...
@@ -123,6 +125,8 @@ Promise.prototype.on = function(evt, fct) {
* Emit an event from the emitter
* Emit an event from the emitter
* @param {string} type The type of event
* @param {string} type The type of event
* @param {any} value(s)* All other arguments will be passed to the event listeners
* @param {any} value(s)* All other arguments will be passed to the event listeners
*
* @deprecated
*/
*/
Promise
.
prototype
.
emit
=
function
(
evt
)
{
Promise
.
prototype
.
emit
=
function
(
evt
)
{
var
args
=
arguments
.
length
>
1
?
Array
.
prototype
.
slice
.
call
(
arguments
,
1
)
:
[];
var
args
=
arguments
.
length
>
1
?
Array
.
prototype
.
slice
.
call
(
arguments
,
1
)
:
[];
...
@@ -159,6 +163,8 @@ Promise.prototype.emit = function(evt) {
...
@@ -159,6 +163,8 @@ Promise.prototype.emit = function(evt) {
* @method success
* @method success
* @alias ok
* @alias ok
* @return this
* @return this
*
* @deprecated
*/
*/
Promise
.
prototype
.
success
=
Promise
.
prototype
.
success
=
Promise
.
prototype
.
ok
=
function
(
fct
)
{
Promise
.
prototype
.
ok
=
function
(
fct
)
{
...
@@ -184,6 +190,8 @@ Promise.prototype.ok = function(fct) {
...
@@ -184,6 +190,8 @@ Promise.prototype.ok = function(fct) {
* @alias fail
* @alias fail
* @alias failure
* @alias failure
* @return this
* @return this
*
* @deprecated
*/
*/
Promise
.
prototype
.
error
=
Promise
.
prototype
.
error
=
Promise
.
prototype
.
failure
=
Promise
.
prototype
.
failure
=
...
@@ -205,6 +213,8 @@ Promise.prototype.fail = function(fct) {
...
@@ -205,6 +213,8 @@ Promise.prototype.fail = function(fct) {
* @method done
* @method done
* @alias complete
* @alias complete
* @return this
* @return this
*
* @deprecated done(fct) is deprecated, done() is regular promise syntax to explicitly signal the end of a promise chain and will not be deprecated
*/
*/
var
bluebirdDone
=
Promise
.
prototype
.
done
;
var
bluebirdDone
=
Promise
.
prototype
.
done
;
Promise
.
prototype
.
done
=
Promise
.
prototype
.
done
=
...
@@ -243,6 +253,8 @@ Promise.prototype.sql = function(fct) {
...
@@ -243,6 +253,8 @@ Promise.prototype.sql = function(fct) {
* @param {Object} [options]
* @param {Object} [options]
* @param {Array} [options.events] An array of the events to proxy. Defaults to sql, error and success
* @param {Array} [options.events] An array of the events to proxy. Defaults to sql, error and success
* @return this
* @return this
*
* @deprecated
*/
*/
Promise
.
prototype
.
proxy
=
function
(
promise
,
options
)
{
Promise
.
prototype
.
proxy
=
function
(
promise
,
options
)
{
options
=
Utils
.
_
.
extend
({
options
=
Utils
.
_
.
extend
({
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment