-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added index.d.ts support for event emitter
- Loading branch information
1 parent
68a9208
commit e54f87e
Showing
1 changed file
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |