typed-typings / npm-blue-tape

The type definition for https://github.com/spion/blue-tape
MIT License
0 stars 0 forks source link

How to add t.shouldFail()? #2

Closed unional closed 8 years ago

unional commented 8 years ago

https://github.com/spion/blue-tape t.shouldFail(promise P, optional class C)

Seems like I have to replicate most of the tape interface. Any better idea?

blakeembrey commented 8 years ago

Huh, yeah, that's a tricky one. I think we can just use augmentation here, to add the interface to the same class.

unional commented 8 years ago

Ok, agreed. Very likely no user would use both blue-tape and tape at the same time. Doesn't make sense to do so. :stuck_out_tongue:

Then that means we have to wait for the tsc to fix the augmentation bug. :rose:

blakeembrey commented 8 years ago

There's no augmentation bug here, is there? It works fine. And actually, check out the blue-tape source - they actually augment it 😉 I was going to say this is impossible, but then I saw they did it and so, so can we 😝.

unional commented 8 years ago

Yeah, I just tested it. It works. Big PR on the way. :stuck_out_tongue_winking_eye:

unional commented 8 years ago

First commit was an error. Somehow git branch ... on vscode doesn't work on this instance (maybe I accidentally added a space in) and cause the code committed to master.

Reverted and force push to fix master.