8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
diffJson
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@types/diff gave the following types for diffJson:
export function diffJson( oldObj: string | object, newObj: string | object, options?: JsonOptions, ): Change[]; export function diffJson( oldObj: string | object, newObj: string | object, options: Callback<Change[]> | (JsonOptions & CallbackOptions<Change[]>), ): void;
And, since diffJson serializes to JSON itself, these types appear to be correct. However, diff v8 requires string inputs:
export declare function diffJson(oldStr: string, newStr: string, options: DiffCallbackNonabortable<string>): undefined; export declare function diffJson(oldStr: string, newStr: string, options: DiffJsonOptionsAbortable & CallbackOptionAbortable<string>): undefined; export declare function diffJson(oldStr: string, newStr: string, options: DiffJsonOptionsNonabortable & CallbackOptionNonabortable<string>): undefined; export declare function diffJson(oldStr: string, newStr: string, options: DiffJsonOptionsAbortable): ChangeObject<string>[] | undefined; export declare function diffJson(oldStr: string, newStr: string, options?: DiffJsonOptionsNonabortable): ChangeObject<string>[];
The text was updated successfully, but these errors were encountered:
D'oh. Yeah, that's definitely wrong. Thanks for catching. Will fix right now.
Probably I should've ported the whole test suite to TypeScript to catch bugs like this.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
@types/diff gave the following types for
diffJson
:And, since
diffJson
serializes to JSON itself, these types appear to be correct. However, diff v8 requires string inputs:The text was updated successfully, but these errors were encountered: