Created
November 25, 2012 22:33
-
-
Save bonnici/4145699 to your computer and use it in GitHub Desktop.
TimezoneJs node definition (WIP)
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
declare module "timezone-js" { | |
export var timezone : TimezoneJs; | |
export var Date: { | |
new (timezone?: string): TimezoneJsDate; | |
new (time: string, timezone?: string): TimezoneJsDate; | |
new (year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: string, timezone?: string): TimezoneJsDate; | |
}; | |
} | |
interface TimezoneJs { | |
zoneFileBasePath: string; | |
loadingScheme: TimezoneJsLoadingScheme; | |
loadingSchemes: TimezoneJsLoadingSchemes; | |
transport: (opts: TimezoneJsOptions) => any; | |
init: (opts?: TimezoneJsOptions) => any; | |
}; | |
interface TimezoneJsOptions { | |
async?: bool; | |
success?: (data: string) => any; | |
error?: (err: Error) => any; | |
url?: string; | |
}; | |
interface TimezoneJsLoadingScheme { | |
}; | |
interface TimezoneJsLoadingSchemes { | |
PRELOAD_ALL: TimezoneJsLoadingScheme; | |
LAZY_LOAD: TimezoneJsLoadingScheme; | |
MANUAL_LOAD: TimezoneJsLoadingScheme; | |
}; | |
interface TimezoneJsDate extends Date { | |
setTimezone: (timezone: string) => void; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment