refactor: Refactor FDV2 protocol handling.#1115
Conversation
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@launchdarkly/js-sdk-common size report |
| let tempType: PayloadType = 'partial'; | ||
| let tempUpdates: Update[] = []; | ||
|
|
||
| function processObj(kind: string, jsonObj: any): any { |
There was a problem hiding this comment.
I am not convinced this is the best layer for this. I think it may be better one level up.
| statusCallback(subsystemCommon.DataSourceState.Valid); | ||
|
|
||
| payloadProcessor.addPayloadListener((payload) => { | ||
| dataCallback(payload.basis, { initMetadata, payload }); |
There was a problem hiding this comment.
Another PR will propagate the changeset type through the layers. I prefer an actual interface for this instead of a single field.
This PR introduces a few refactoring changes to:
Likely subsequent changes will be made to use a more "pull" based approach to the data sources instead of the callback based approach, but that is TBD.