You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a minor issue, but I use tsc --pretty in my pipeline and I started getting an error when building a project using the 2.1.1 version of node-diff3, so I have to stay on 2.1.0 until resolved:
"Type 'Buffer' is not generic."
for the new definition of patch in node-diff3/index.d.ts:
"export function patch(buffer: T[], patch: IPatchRes[]): Buffer[];"
Thanks for making this very useful library!
The text was updated successfully, but these errors were encountered:
Ok, I can see the issue, this is the actual line from index.d.ts (not sure why the messages show it as what I put in the original post instead):
export function patch<T>(buffer: T[], patch: IPatchRes<T>[]): Buffer<T>[];
"Buffer" is indeed an attempt to use Buffer as a generic. If the function truly returns an arrray of binary Buffer objects, the correct export would be:
export function patch<T>(buffer: T[], patch: IPatchRes<T>[]): Buffer[];
If the function returns an array of type T, which seems more consistent with the other functions, it would be
export function patch<T>(buffer: T[], patch: IPatchRes<T>[]): T[];
Hi @bhousel
This is a minor issue, but I use tsc --pretty in my pipeline and I started getting an error when building a project using the 2.1.1 version of node-diff3, so I have to stay on 2.1.0 until resolved:
"Type 'Buffer' is not generic."
for the new definition of patch in node-diff3/index.d.ts:
"export function patch(buffer: T[], patch: IPatchRes[]): Buffer[];"
Thanks for making this very useful library!
The text was updated successfully, but these errors were encountered: