Skip to content

Commit cf44a37

Browse files
fix: export ArrayChange type (#626)
* fix: export ArrayChange type * Make ArrayChange take a type parameter like in the old DefinitelyTyped definitions --------- Co-authored-by: Mark Amery <markrobertamery@gmail.com>
1 parent 329f85b commit cf44a37

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import {convertChangesToXML} from './convert/xml.js';
4747
import type {
4848
ChangeObject,
4949
Change,
50+
ArrayChange,
5051
DiffArraysOptionsAbortable,
5152
DiffArraysOptionsNonabortable,
5253
DiffCharsOptionsAbortable,
@@ -102,6 +103,7 @@ export {
102103
export type {
103104
ChangeObject,
104105
Change,
106+
ArrayChange,
105107
DiffArraysOptionsAbortable,
106108
DiffArraysOptionsNonabortable,
107109
DiffCharsOptionsAbortable,

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface ChangeObject<ValueT> {
2323
// explicitly reference by name in their own code, so keeping its name consistent is valuable even
2424
// though the names of many other types are inconsistent with the old DefinitelyTyped names.
2525
export type Change = ChangeObject<string>;
26-
export type ArrayChange = ChangeObject<any[]>;
26+
export type ArrayChange<T> = ChangeObject<T[]>;
2727

2828
export interface CommonDiffOptions {
2929
/**

0 commit comments

Comments
 (0)