Commit Graph

24 Commits

Author SHA1 Message Date
Max Howell
08fb076071
Update CommonPatterns.md 2019-09-04 14:01:49 -04:00
Max Howell
91f002f6f6
mxcl.github.io|promisekit.org -> mxcl.dev
* Fixes broken links
* Corrects spelling

[skip ci]
2019-03-01 00:02:04 -05:00
Max Howell
8218b667bf
Fixes #984 2019-01-15 11:49:36 -05:00
Max Howell
3d544c4f5b
Update CommonPatterns.md 2018-11-29 20:23:15 -05:00
Max Howell
fbe14e6bec Demonstrate how to sequence [Promise] 2018-10-12 13:55:42 -04:00
Dmitriy Borovikov
1238d4e764 Update documentation referencing .allErrorsIncludingCancellation 2018-07-18 11:11:29 +03:00
Garth Snyder
2b88cac8e0 Doc headings to title case, no Oxford commas 2018-06-27 10:50:56 -07:00
Garth Snyder
fecf4f8430 Documentation copy editing, add more RxSwift info, fix asVoid() example 2018-06-17 15:37:09 -07:00
Johannes Dörr
84f1f29005 Added link to CancellablePromiseKit 2018-05-19 21:05:57 +02:00
Max Howell
2e562d4b12
NSError.cancelledError is no longer provided. 2018-05-03 22:27:02 -05:00
Christopher Swasey
ecfce1aba0 Fix example in Common Patterns 2018-03-01 11:16:17 -05:00
Max Howell
0ea38acd5a [ci skip] Reference Alamofire extension more times 2018-02-28 13:23:57 -05:00
Max Howell
ac716cc234 [ci skip] Tweaks to Common-Patterns 2018-02-26 12:59:36 -05:00
Max Howell
ca845042f7 [ci skip] flatMap -> compactMap 2018-02-19 23:37:26 -05:00
Max Howell
59847871ba Xcode 9.3 / Swift 4.1 / Swift 3.3 updates
Strictly I’d feel better to test all configurations, but PromiseKit only uses Foundation, so the chance that for some reason there is an API break or worse some kind of runtime issue is pretty low and I feel that we have to be kinder to Travis’s free infrastructure.

Tag 6.0.2
2018-02-16 15:26:52 -05:00
Max Howell
17587be4ac PromiseKit 6.0.0
This because `Promise(value:)` is selected for PMK-4’s pending initializer due to trailing closure syntax and the fact that `T` could be anything. I guess this isn’t a Swift bug, but geez.

This is a real problem for people migrating to 5 from 4, such that I have decided 5 must be deprecated.

The severity is due to Swift giving a very misleading error diagnostic when it uses `Promise(value:)`, because as you can guess you end up with:

    Promise<(T->Void, Error->Void)>

As your inferred type.

Because we no longer have ambiguity between `Promise { seal in` and `Promise(value:` I have removed the `.pending` parameter for that usage which will also aid migration.

In some cases this leads to less nice code, but mostly it’s fine due to being able to do `.value(1)` where `Promise` can be inferred. The trade off is worth it though as PromiseKit should be delightful to use and as it stands, it is a pain due to how Swift is.
2018-02-10 17:23:27 -05:00
Vineet Shah
322b67b41c Fix syntax errors in Cancellation documentation 2018-01-16 09:37:58 -05:00
Max Howell
5321a44527 Mention when(concurrently:) under sequencing 2017-11-30 11:23:15 -05:00
Kara Valentine
75117687e5 Update CommonPatterns.md (#735)
Fixed a typo
2017-11-16 20:10:18 -05:00
Ryan Schneider
50c4b0f79e Update CommonPatterns.md attempt example
Update `attempt` example to use new `after(interval: DispatchTimeInterval)` preferred signature.
2017-08-01 10:45:05 -07:00
Ryan Schneider
a02f8b8791 Fix syntax issues in attempt example
I just ended up using the `attempt` example in some code, but had to make some syntactical fix-ups to get it to work and figured I'd send them back your way:

- `after` takes a `TimeInterval`, not a `DispatchTimeInterval`
- The signature referred to `source` instead of `body` (which needed to be marked `@escaping`)
- Missing `{`
2017-07-28 16:09:04 -07:00
Max Howell
db8bfd63b0 Clarify between canceling the chain and the task 2017-07-27 17:26:23 -04:00
Alan D. Cabrera
9395635cfb Add DispatchTimeInterval to after() function
While the use of TimeInterval is understandable from the perspective
of maintaining parity with the Objective-C function PMKAfter, it's not
quite as strongly typed as DispatchTimeInterval.  Also, what's really
going on is a dispatch after a deadline and so support for both seconds
and DispatchTimeInterval seem warranted.
2017-07-09 12:05:43 -07:00
Max Howell
212f31f418 Move documentation to master 2017-06-26 15:40:13 -04:00