Skip to content

Remove second argument of applyChange from public api #115

@fedulovivan

Description

@fedulovivan

diff/index.js

Line 260 in c97fb9c

if (target && source && change && change.kind) {

Hello! First of all thanks for a nice tool.

Is it possible to completely remove second argument 'source' from public api of applyChange utility?
Even it is not really used (and docs clearly state this), function checks that passed source is 'truthy',
so a have to use following pattern:

changes.forEach(change => applyChange(
    INITIAL_STATE,
    true/*stated as not used in docs, but have to be truthy to pass internal checks*/, 
    change
))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions