Coder Social home page Coder Social logo

pjs's People

Contributors

jridgewell avatar madarauchiha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pjs's Issues

PJs does not play well with esbuild DCE

summary
Due to the module-level side effects, PJs is not able to be DCEd.
I.e., import 'promise-pjs'; will add code to a bundle.

In practice, I'm seeing this add ~3.7kb uncompressed, 0.5kb compressed to my project.

Type errors during PJs compilation with closure compiler

node_modules/promise-pjs/promise.js:202: WARNING - optional arguments must be at the end
function FulfilledPromise(value, onFulfilled, unused, deferred) {
^

node_modules/promise-pjs/promise.js:229: WARNING - optional arguments must be at the end
function RejectedPromise(reason, unused, onRejected, deferred) {
^

node_modules/promise-pjs/promise.js:256: WARNING - optional arguments must be at the end
function PendingPromise(queue, onFulfilled, onRejected, deferred) {

Please clean up closure compiler warnings

These can likely be silenced by adding correct @this {โ€ฆ} annotations.

node_modules/promise-pjs/promise.js:91: WARNING - dangerous use of this in static method Promise$$module$promise_pjs$promise.resolve
  var Constructor = this;
                    ^

node_modules/promise-pjs/promise.js:94: WARNING - dangerous use of this in static method Promise$$module$promise_pjs$promise.resolve
  if (isObject(value) && value instanceof this) {
                                          ^

node_modules/promise-pjs/promise.js:112: WARNING - dangerous use of this in static method Promise$$module$promise_pjs$promise.reject
  var Constructor = this;
                    ^

node_modules/promise-pjs/promise.js:129: WARNING - dangerous use of this in static method Promise$$module$promise_pjs$promise.all
  var Constructor = this;
                    ^

node_modules/promise-pjs/promise.js:159: WARNING - dangerous use of this in static method Promise$$module$promise_pjs$promise.race
  var Constructor = this;
                    ^

node_modules/promise-pjs/promise.js:431: WARNING - Misplaced function annotation. This JSDoc is not attached to a function node. Are you missing parentheses?
  return function defer(fn) {
  ^

0 error(s), 6 warning(s)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.