adobe-photoshop / generator-connection Goto Github PK
View Code? Open in Web Editor NEWGenerator Websocket RPC client
Generator Websocket RPC client
Hi,
I used node-connection-example and got this warning from Bluebird lib
Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
at EventEmitter.NodeConnection.connect (file:///Users/user/node-connection-example/js/components/generator-connection/lib/NodeConnection.js:269:32)
at EventEmitter.NodeDomain (file:///Users/user/node-connection-example/js/components/generator-connection/lib/NodeDomain.js:81:46)
at HTMLDocument.<anonymous> (file:///Users/user/node-connection-example/js/app/main.js:XX:XX)
at fire (file:///Users/user/node-connection-example/js/components/jquery/dist/jquery.js:3099:30)
at Object.add [as done] (file:///Users/user/node-connection-example/js/components/jquery/dist/jquery.js:3145:7)
at jQuery.fn.ready (file:///Users/user/node-connection-example/js/components/jquery/dist/jquery.js:3378:25)
at jQuery.fn.init (file:///Users/user/node-connection-example/js/components/jquery/dist/jquery.js:2821:16)
at jQuery (file:///Users/user/node-connection-example/js/components/jquery/dist/jquery.js:76:10)
at file:///Users/user/node-connection-example/js/app/main.js:21:5
at Object.execCb (file:///Users/user/node-connection-example/js/components/requirejs/require.js:1690:33)
at Object.check (file:///Users/user/node-connection-example/js/components/requirejs/require.js:865:51)
at Object.<anonymous> (file:///Users/user/node-connection-example/js/components/requirejs/require.js:1140:34)
at file:///Users/user/node-connection-example/js/components/requirejs/require.js:131:23
Apparently the deprecation is old and needs to be fixed http://bluebirdjs.com/docs/deprecated-apis.html
Instead of doing:
var deferred = Promise.defer();
doSomething(function cb(err, res) {
if (err) deferred.reject(err); else deferred.resolve(res);
});
return deferred.promise;
You should do:
return new Promise(function(resolve, reject) {
doSomething(function cb(err, res) {
if (err) reject(err); else resolve(res);
});
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.