From b283f6c33ad16bcc947cc76883b210f8bb70c4d3 Mon Sep 17 00:00:00 2001 From: Andrei Fangli Date: Mon, 24 Jun 2024 12:33:58 +0300 Subject: [PATCH] Added missing `index` exports and type --- src/collections/index.ts | 19 +++++++++++++++++-- .../observableMap/IMapChangedEventHandler.ts | 11 +++++++++++ src/collections/observableMap/index.ts | 7 +++++++ src/collections/observableSet/index.ts | 4 +++- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 src/collections/observableMap/IMapChangedEventHandler.ts create mode 100644 src/collections/observableMap/index.ts diff --git a/src/collections/index.ts b/src/collections/index.ts index 35ef0da..8808fae 100644 --- a/src/collections/index.ts +++ b/src/collections/index.ts @@ -28,5 +28,20 @@ export { type ISetLike, type IReadOnlyObservableSet, - type IObservableSet -} from './observableSet'; \ No newline at end of file + type IObservableSet, + + ReadOnlyObservableSet, + ObservableSet, + isSetLike +} from './observableSet'; + +export { + type INotifyMapChanged, + type IMapChangedEvent, + type IMapChangedEventHandler, + type IMapChange, + type MapChangeOperation, + + type IReadOnlyObservableMap, + type IObservableMap +} from './observableMap'; \ No newline at end of file diff --git a/src/collections/observableMap/IMapChangedEventHandler.ts b/src/collections/observableMap/IMapChangedEventHandler.ts new file mode 100644 index 0000000..8d4a113 --- /dev/null +++ b/src/collections/observableMap/IMapChangedEventHandler.ts @@ -0,0 +1,11 @@ +import type { IEventHandler } from "../../events"; +import type { IMapChange } from "./IMapChange"; + +/** + * A specialized interface for handling map changed events. + * @template TSubject The type of object that raises the event. + * @template TKey The type of keys the map contains. + * @template TItem The type of items the map contains. + */ +export interface IMapChangedEventHandler extends IEventHandler> { +} \ No newline at end of file diff --git a/src/collections/observableMap/index.ts b/src/collections/observableMap/index.ts new file mode 100644 index 0000000..26456f5 --- /dev/null +++ b/src/collections/observableMap/index.ts @@ -0,0 +1,7 @@ +export type { IMapChange, MapChangeOperation } from './IMapChange'; +export type { INotifyMapChanged } from './INotifyMapChanged'; +export type { IMapChangedEvent } from './IMapChangedEvent'; +export type { IMapChangedEventHandler } from './IMapChangedEventHandler'; + +export type { IReadOnlyObservableMap } from './IReadOnlyObservableMap'; +export type { IObservableMap } from './IObservableMap'; \ No newline at end of file diff --git a/src/collections/observableSet/index.ts b/src/collections/observableSet/index.ts index b0455e3..a2e4794 100644 --- a/src/collections/observableSet/index.ts +++ b/src/collections/observableSet/index.ts @@ -1,10 +1,12 @@ +export type { ISetChange, SetChangeOperation } from './ISetChange'; export type { INotifySetChanged } from './INotifySetChanged'; export type { ISetChangedEvent } from './ISetChangedEvent'; export type { ISetChangedEventHandler } from './ISetChangedEventHandler'; -export type { ISetChange, SetChangeOperation } from './ISetChange'; export type { ISetLike } from './ISetLike'; export type { IReadOnlyObservableSet } from './IReadOnlyObservableSet'; export type { IObservableSet } from './IObservableSet'; +export { ReadOnlyObservableSet } from './ReadOnlyObservableSet'; +export { ObservableSet } from './ObservableSet'; export { isSetLike } from './isSetLike'; \ No newline at end of file