typed-typings / npm-bluebird Goto Github PK
View Code? Open in Web Editor NEWThe type definition for https://github.com/petkaantonov/bluebird
License: MIT License
The type definition for https://github.com/petkaantonov/bluebird
License: MIT License
Branch | Build failing π¨ |
---|---|
Dependency | tslint |
Current Version | 5.4.2 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As tslint is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
--out
file (#2867)unified-signatures
: Don't suggest to unify rest parameters. (#2874)binary-expression-operand-order
: Allow if both sides of the binary expression are literals. (#2873)whitespace
, space-before-function-paren
and deprecation
(#2893)no-string-literal
: Fix documentation (#2875)There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
It is currently valid to define .catch
using a shorthand predicate. The current definition only supports function predicates.
Code snippet of a valid .catch
.catch({code: 'ENOENT'}, function(e) {
console.log("file not found: " + e.path);
});
I suggest getting rid of functionality tests altogether. They're not useful and they block us from having more extensive type tests. I'd rather have something like what's in env-node
and typed-sequelize
.
Operand for 'await' does not have a valid callable 'then' member
@types/bluebird gives the following error:
node_modules/@types/bluebird/index.d.ts(623,33): error TS2304: Cannot find name 'Map'.
node_modules/@types/bluebird/index.d.ts(623,78): error TS2304: Cannot find name 'Map'.
node_modules/@types/bluebird/index.d.ts(810,39): error TS2304: Cannot find name 'Map'.
node_modules/@types/bluebird/index.d.ts(810,78): error TS2304: Cannot find name 'Map'.
node_modules/@types/bluebird/index.d.ts(813,27): error TS2304: Cannot find name 'Map'.
node_modules/@types/bluebird/index.d.ts(813,65): error TS2304: Cannot find name 'Map'.
Based on Bluebird's cancellation reference callback passed to Promise
constructor should accept optional onCancel
hook and Promise
instances should have cancel method. There is also inspection method isCancelled for checking if promise has been cancelled.
Branch | Build failing π¨ |
---|---|
Dependency | ts-node |
Current Version | 3.0.4 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As ts-node is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
The new version differs by 7 commits.
c18331a
3.0.5
5cf97b1
Add --inspect-brk
to known flags (#343)
7dfb3e3
Pin node tests at 6.x
(#340)
633d537
chore(package): update chai to version 4.0.1 (#337)
b751a56
Define exports
and improve getTypeInfo
help (#332)
d018300
Update yn
default option
cc3bf22
Expose _
bin file for consumers to use
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
Hi,
I just noticed that the fix to .get and .join that I made a few weeks ago were lost.
Here is this repo's history:
The loss occurred during the highlighted merge, but it's a bit strange: the other projects did not have the same origin. Is it possible to revert it quickly ? (I'll submit a pull request but maybe there is a better way to do it).
Promise.reflect()
returns a Promise<PromiseInspection>
, but the current definition has it returning just a PromiseInspection
.
See the conversation here
Should this be valid?
import Promise = require('bluebird');
new Promise((resolve, reject) => {
resolve();
});
Currently, we have to:
...
new Promise((resolve, reject) => {
resolve(null);
});
[ts] Type 'Bluebird<Model[]>' is not assignable to type 'Promise<User[]>'.
Types of property 'then' are incompatible.
Type '{ <U1, U2>(onFulfill: (value: Model[]) => U1 | Thenable<U1>, onReject: (error: any) => U2 | Thena...' is not assignable to type '{ <TResult1, TResult2>(onfulfilled: (value: User[]) => TResult1 | PromiseLike<TResult1>, onreject...'.
Type 'Bluebird<any>' is not assignable to type 'Promise<any>'.
Property '[Symbol.toStringTag]' is missing in type 'Bluebird<any>'.
This prevents Sequelize users from writing methods with a Promise
return type and returning a bluebird promise.
Hi,
I would like to know what is the problem with the declaration of .get.
This is the related part:
/**
* This is a convenience method for doing:
*
* <code>
* promise.then(function(obj){
* return obj[propertyName];
* });
* </code>
*/
// TODO find way to fix get()
// get<U>(propertyName: string): Promise<U>;
Isn't it possible to just type it as get<U>(key: string | number): Promise<U>;
?
Opening this ticket to track progress. Will submit a PR eventually, unless someone swoops me beforehand
Bluebird API reference
Hi,
I encountered an error when I wanted to use .resolve
to nomalize a value that could either be a Promise or already resolved. The compiler did not let me do that:
type EventualPromise<T> = T | Bluebird.Thenable<T>;
let eventualStringPromise: EventualPromise<string>;
Bluebird.resolve(eventualPromise)
.then((resolved: string) => {
console.log(resolved);
});
This fails because string | Bluebird.Thenable<string>
is not assignable to string
.
Here are the related definitions:
// currently:
static resolve(): Bluebird<void>;
static resolve<R>(value: Bluebird.Thenable<R>): Bluebird<R>;
static resolve<R>(value: R): Bluebird<R>;
// Proposed:
static resolve(): Bluebird<void>;
static resolve<R>(value: R | Bluebird.Thenable<R>): Bluebird<R>;
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.