1 | ### Why
|
2 |
|
3 | Getting typechecking for the internals makes development more fun and safer too.
|
4 |
|
5 | Also, will be great to get a fully and correctly type version of Bacon out!
|
6 |
|
7 | ### Changes
|
8 |
|
9 | - Function Construction Rules are gone. No more `stream.map(".fieldName")`
|
10 | - Tests are now always run against ../dist/Bacon.js which is a good thing. Makes sure the actual bundle is working.
|
11 | - observable.last() only stores value events, passes through errors (I think this was a bug)
|
12 | - added Bacon.silence(duration)
|
13 | - Replaced `withHandler` with `transform`
|
14 | - Observable argument support removed from `fromCallback` and `fromNodeCallback`
|
15 |
|
16 | ### Not so nice things
|
17 |
|
18 | - I've had to resort to some `<any>` typings in, for example `EventStream.map` to
|
19 | avoid code duplication between implementations for eventstreams and properties.
|
20 | If TypeScript had higher-kinded types, this might be avoidable.
|
21 |
|
22 |
|
23 | ### TODO
|
24 |
|
25 | - Tsdocs lose types of callback functions. See docs/classes/observable.html#map for example
|
26 | - Tsdocs for eventstream and property methods do not inherit content from observable. Need to duplicate?
|
27 | - README not fully updated yet
|
28 | - jQuery "this" binding test failing.
|
29 | - The `npm run dist` thingie that uses Rollup currently hides typescript type errors.
|
30 | As an interim solution there's `npm run watch-ts`
|
31 | - Partial builds not working. Work not started. See below.
|
32 |
|
33 | ### Design decisions
|
34 |
|
35 | The earlier approach of adding methods to prototypes in different source files
|
36 | doesn't work with Typescript. The new design is such that operations (like `map`) are
|
37 | defined in their own source files but included in the `Observable`, `EventStream`
|
38 | and `Property` classes by delegating to the implementations in the separate modules.
|
39 | This allows library users to use Bacon.js just like before but also allows you to
|
40 | require separate methods if you like. Partial builds are currently not possible, but
|
41 | could be created by some preprocessing on the 3 files. |
\ | No newline at end of file |