Conversation
|
is there any way to do this in pieces or is the plan to make the changes all at once? |
|
We can do this in pieces, I thought I would publish this since we started tackling the same stuff. I was trying to see how flowtype would fit into the project an started fixing all the things it started giving me errors about. |
| * @param {String} id - the bucket object id to fetch | ||
| * @param {bucketStoreGetCallback} - callback once the object is fetched | ||
| */ | ||
| get( id: string, callback: ( ?Error, ?BucketObject ) => void ): void; |
There was a problem hiding this comment.
why not standardize on a Promise interface? that would let people more easily use async/await too
There was a problem hiding this comment.
Thats the goal, this is just keeping backwards compatibility right now.
| id: string, | ||
| version: number, | ||
| data: {} | ||
| }; |
There was a problem hiding this comment.
sidenote: I find this extremely helpful. the hardest part in reading through this code or in the Simperium server's code isn't know when a type is invalid, but knowing when a collection of properties is supposed to be a given type, or knowing what properties to supply when a hidden remote function expects certain ones.
There was a problem hiding this comment.
I hope with fully defined jsondiff types this will shine a blazing light on all expected properties in the diffing/syncing magic.
| var operation = { | ||
| type Modify = 'M'; | ||
| type Remove = '-'; | ||
| type OperationType = Modify | Remove; |
There was a problem hiding this comment.
for funnies check out the utility types
const operations = {
Modify: 'M',
Remove: '-'
};
type Operation = $Values<typeof operations>;
something like that
|
The linter is complaining about a few things: Looks like some class definitions need to be moved around and some spacing cleanup. |
|
I switched this to merge with |
|
For this: When it's class definitions it shouldn't be a problem so we could |
WFM, but we'll need to add that 7 times in |
|
I had considered moving type definitions for the main components into it's own file which fixes this problem. I think the goal is to break this PR into smaller pieces too. |
|
#62 is the beginning of a smaller portion of this PR. |
Builds off of #56
internalmethods to usethiscontext..bind