Skip to content

jsonDeepDiffList types are any #1

@iddan-flycode

Description

@iddan-flycode

The signature of jsonDeepDiffList making it unsafe to use (the structure of the changes object is not validated by TypeScript at all)

export declare function jsonDeepDiffList(oldObj: any, newObj: any, options?: JODOptions): any[];

Can the return type be changed to something like:

type JSONDeepDiffChange = {
    type: 'add' | 'delete' | 'replace',
    path: string,
    after: unknown;
    before: unknown;
}

export declare function jsonDeepDiffList(oldObj: any, newObj: any, options?: JODOptions): JSONDeepDiffChange[];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions