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
Hide 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) {
*
* @param {String} evt
* @param {Function} fct
*
* @deprecated
*/
Promise
.
prototype
.
on
=
function
(
evt
,
fct
)
{
if
(
evt
===
'success'
)
{
...
...
@@ -123,6 +125,8 @@ Promise.prototype.on = function(evt, fct) {
* Emit an event from the emitter
* @param {string} type The type of event
* @param {any} value(s)* All other arguments will be passed to the event listeners
*
* @deprecated
*/
Promise
.
prototype
.
emit
=
function
(
evt
)
{
var
args
=
arguments
.
length
>
1
?
Array
.
prototype
.
slice
.
call
(
arguments
,
1
)
:
[];
...
...
@@ -159,6 +163,8 @@ Promise.prototype.emit = function(evt) {
* @method success
* @alias ok
* @return this
*
* @deprecated
*/
Promise
.
prototype
.
success
=
Promise
.
prototype
.
ok
=
function
(
fct
)
{
...
...
@@ -184,6 +190,8 @@ Promise.prototype.ok = function(fct) {
* @alias fail
* @alias failure
* @return this
*
* @deprecated
*/
Promise
.
prototype
.
error
=
Promise
.
prototype
.
failure
=
...
...
@@ -205,6 +213,8 @@ Promise.prototype.fail = function(fct) {
* @method done
* @alias complete
* @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
;
Promise
.
prototype
.
done
=
...
...
@@ -243,6 +253,8 @@ Promise.prototype.sql = function(fct) {
* @param {Object} [options]
* @param {Array} [options.events] An array of the events to proxy. Defaults to sql, error and success
* @return this
*
* @deprecated
*/
Promise
.
prototype
.
proxy
=
function
(
promise
,
options
)
{
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