Skip to content

Commit

Permalink
Added index.d.ts support for event emitter
Browse files Browse the repository at this point in the history
  • Loading branch information
KromDaniel committed Aug 31, 2017
1 parent 68a9208 commit e54f87e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
declare module "local-storage" {
export function set<T>(key: string, value: T): boolean;
export function get<T>(key: string): T;
export function remove(key:string):void;
export function clear():void;
export function remove(key: string): void;
export function clear(): void;

export function on<T>(key:string,cb: (value:T)=>void):void;
export function on<T>(key:string,cb: (value:T,old : T)=>void):void;
export function on<T>(key:string,cb: (value:T,old : T,url: T)=>void):void;
export function off<T>(key:string,cb: (value:T)=>void):void;
export function off<T>(key:string,cb: (value:T,old : T)=>void):void;
export function off<T>(key:string,cb: (value:T,old : T,url: T)=>void):void;
export default function<T>(key:string,value?:T):void;
export function on<T>(key: string, cb: (value: T) => void): void;
export function on<T>(key: string, cb: (value: T, old: T) => void): void;
export function on<T>(key: string, cb: (value: T, old: T, url: T) => void): void;

export function off<T>(key: string, cb: (value: T) => void): void;
export function off<T>(key: string, cb: (value: T, old: T) => void): void;
export function off<T>(key: string, cb: (value: T, old: T, url: T) => void): void;
export default function <T>(key: string, value?: T): void;
}

0 comments on commit e54f87e

Please sign in to comment.