Skip to content

Commit

Permalink
fix(types): dispatch first argument
Browse files Browse the repository at this point in the history
 & descriptor's connect method proper types
  • Loading branch information
smalluban committed Jan 28, 2020
1 parent 39baaa8 commit fb76ece
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ declare namespace hybrids {
interface Descriptor<E extends HTMLElement> {
get?(host: E, lastValue: any): any;
set?(host: E, value: any, lastValue: any): any;
connect?(host: E, key: string, invalidate: Function): Function;
connect?(host: E, key: string, invalidate: Function): Function | void;
observe?(host: E, value: any, lastValue: any): void;
}

Expand Down Expand Up @@ -57,7 +57,7 @@ declare namespace hybrids {
function render<E extends HTMLElement>(fn: RenderFunction<E>, customOptions?: { shadowRoot?: boolean | object }): Descriptor<E>;

/* Utils */
function dispatch(host: HTMLElement, eventType: string, options?: CustomEventInit): boolean;
function dispatch(host: EventTarget, eventType: string, options?: CustomEventInit): boolean;

/* Template Engine */

Expand Down

0 comments on commit fb76ece

Please # to comment.