@equinor/fusion-framework-module-event
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -6,2 +6,6 @@ # Change Log | ||
## 1.1.5 (2022-12-01) | ||
**Note:** Version bump only for package @equinor/fusion-framework-module-event | ||
## 1.1.4 (2022-11-11) | ||
@@ -8,0 +12,0 @@ |
@@ -14,2 +14,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
export class EventModuleProvider extends Observable { | ||
get closed() { | ||
return this.__event$.closed; | ||
} | ||
constructor(config) { | ||
@@ -26,5 +29,2 @@ super((subscriber) => { | ||
} | ||
get closed() { | ||
return this.__event$.closed; | ||
} | ||
addEventListener(type, handler) { | ||
@@ -31,0 +31,0 @@ if (this.closed) { |
import { IFrameworkEvent } from './event'; | ||
export declare type FrameworkEventHandler<TType extends IFrameworkEvent = IFrameworkEvent> = (event: TType) => Promise<void> | void; | ||
export type FrameworkEventHandler<TType extends IFrameworkEvent = IFrameworkEvent> = (event: TType) => Promise<void> | void; | ||
export interface IFrameworkDispatcher<TEvent extends IFrameworkEvent> { | ||
dispatch(event: TEvent, listeners: Array<FrameworkEventHandler<TEvent>>): Promise<void>; | ||
} | ||
export declare type FrameworkEventDispatcherCtorArgs<TEvent extends IFrameworkEvent> = { | ||
export type FrameworkEventDispatcherCtorArgs<TEvent extends IFrameworkEvent> = { | ||
onDispatch?: FrameworkEventHandler<TEvent>; | ||
@@ -8,0 +8,0 @@ onBubble?: FrameworkEventHandler<TEvent>; |
@@ -6,3 +6,3 @@ import type { ModuleInstance } from '@equinor/fusion-framework-module'; | ||
} | ||
export declare type FrameworkEventHandler<TType extends IFrameworkEvent = IFrameworkEvent> = (event: TType) => Promise<void> | void; | ||
export type FrameworkEventHandler<TType extends IFrameworkEvent = IFrameworkEvent> = (event: TType) => Promise<void> | void; | ||
export interface IFrameworkEvent<TInit extends FrameworkEventInit = FrameworkEventInit, TType extends string = string> { | ||
@@ -17,3 +17,3 @@ readonly type: TType; | ||
} | ||
export declare type FrameworkEventInit<TDetail = unknown, TSource = unknown> = { | ||
export type FrameworkEventInit<TDetail = unknown, TSource = unknown> = { | ||
detail: TDetail; | ||
@@ -25,8 +25,8 @@ source?: TSource; | ||
}; | ||
export declare type FrameworkEventInitType<T> = T extends IFrameworkEvent<infer U> ? U : never; | ||
export declare type FrameworkEventType<T> = T extends IFrameworkEvent<FrameworkEventInit, infer U> ? U : never; | ||
export declare type FrameworkEventInitDetail<T> = T extends FrameworkEventInit<infer U> ? U : never; | ||
export declare type FrameworkEventInitSource<T> = T extends FrameworkEventInit<unknown, infer U> ? U : never; | ||
export declare type FrameworkEventDetail<T> = T extends IFrameworkEvent<infer U> ? FrameworkEventInitDetail<U> : never; | ||
export declare type FrameworkEventSource<T> = T extends IFrameworkEvent<infer U> ? FrameworkEventInitSource<U> : never; | ||
export type FrameworkEventInitType<T> = T extends IFrameworkEvent<infer U> ? U : never; | ||
export type FrameworkEventType<T> = T extends IFrameworkEvent<FrameworkEventInit, infer U> ? U : never; | ||
export type FrameworkEventInitDetail<T> = T extends FrameworkEventInit<infer U> ? U : never; | ||
export type FrameworkEventInitSource<T> = T extends FrameworkEventInit<unknown, infer U> ? U : never; | ||
export type FrameworkEventDetail<T> = T extends IFrameworkEvent<infer U> ? FrameworkEventInitDetail<U> : never; | ||
export type FrameworkEventSource<T> = T extends IFrameworkEvent<infer U> ? FrameworkEventInitSource<U> : never; | ||
export interface FrameworkEvent<TInit extends FrameworkEventInit> { | ||
@@ -33,0 +33,0 @@ new (type: keyof FrameworkEventMap, args: TInit): IFrameworkEvent<TInit>; |
@@ -6,4 +6,4 @@ import { Module, ModuleInstance } from '@equinor/fusion-framework-module'; | ||
export declare const moduleKey = "event"; | ||
export declare type EventModule = Module<typeof moduleKey, IEventModuleProvider, IEventModuleConfigurator>; | ||
export declare type FrameworkEventModuleLoadedEvent = FrameworkEvent<FrameworkEventInit<ModuleInstance, EventModuleProvider>>; | ||
export type EventModule = Module<typeof moduleKey, IEventModuleProvider, IEventModuleConfigurator>; | ||
export type FrameworkEventModuleLoadedEvent = FrameworkEvent<FrameworkEventInit<ModuleInstance, EventModuleProvider>>; | ||
export declare const module: EventModule; | ||
@@ -10,0 +10,0 @@ export default module; |
{ | ||
"name": "@equinor/fusion-framework-module-event", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Fusion module for events", | ||
@@ -38,3 +38,3 @@ "main": "./dist/esm/index.js", | ||
}, | ||
"gitHead": "676b6bab4e586885185d21b14bd61f392e76f74d" | ||
"gitHead": "8771d3b889de73fff04309f106bd132bee668bab" | ||
} |
@@ -12,2 +12,5 @@ { | ||
"path": "../module" | ||
}, | ||
{ | ||
"path": "../../utils/observable" | ||
} | ||
@@ -14,0 +17,0 @@ ], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112284
691