Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.d.ts 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Type definitions for moment-timezone.js 0.5
  2. // Project: http://momentjs.com/timezone/
  3. // Definitions by: Michel Salib <https://github.com/michelsalib>
  4. // Alan Brazil Lins <https://github.com/alanblins>
  5. // Agustin Carrasco <https://github.com/asermax>
  6. // Borys Kupar <https://github.com/borys-kupar>
  7. // Anthony Rainer <https://github.com/pristinesource>
  8. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
  9. // Migrated here from DefinitelyTyped in release moment-timezone@0.5.30
  10. import moment = require('moment');
  11. declare module 'moment' {
  12. interface MomentZone {
  13. name: string;
  14. abbrs: string[];
  15. untils: number[];
  16. offsets: number[];
  17. population: number;
  18. abbr(timestamp: number): string;
  19. offset(timestamp: number): number;
  20. utcOffset(timestamp: number): number;
  21. parse(timestamp: number): number;
  22. }
  23. interface MomentZoneOffset {
  24. name: string;
  25. offset: number;
  26. }
  27. interface MomentTimezone {
  28. (): moment.Moment;
  29. (timezone: string): moment.Moment;
  30. (date: number, timezone: string): moment.Moment;
  31. (date: number[], timezone: string): moment.Moment;
  32. (date: string, timezone: string): moment.Moment;
  33. (date: string, format: moment.MomentFormatSpecification, timezone: string): moment.Moment;
  34. (date: string, format: moment.MomentFormatSpecification, strict: boolean, timezone: string): moment.Moment;
  35. (date: string, format: moment.MomentFormatSpecification, language: string, timezone: string): moment.Moment;
  36. (date: string, format: moment.MomentFormatSpecification, language: string, strict: boolean, timezone: string): moment.Moment;
  37. (date: Date, timezone: string): moment.Moment;
  38. (date: moment.Moment, timezone: string): moment.Moment;
  39. (date: any, timezone: string): moment.Moment;
  40. zone(timezone: string): MomentZone | null;
  41. add(packedZoneString: string): void;
  42. add(packedZoneString: string[]): void;
  43. link(packedLinkString: string): void;
  44. link(packedLinkString: string[]): void;
  45. load(data: { version: string; links: string[]; zones: string[] }): void;
  46. names(): string[];
  47. zonesForCountry<T extends true>(country: string, with_offset: T): T extends true ? MomentZoneOffset[] : never;
  48. zonesForCountry<T extends false>(country: string, with_offset?: T): T extends false ? string[] : never;
  49. zonesForCountry(country: string, with_offset?: boolean): MomentZoneOffset[] | string[];
  50. countries(): string[];
  51. guess(ignoreCache?: boolean): string;
  52. setDefault(timezone?: string): Moment;
  53. dataVersion: string;
  54. }
  55. interface Moment {
  56. tz(): string | undefined;
  57. tz(timezone: string, keepLocalTime?: boolean): moment.Moment;
  58. zoneAbbr(): string;
  59. zoneName(): string;
  60. }
  61. const tz: MomentTimezone;
  62. }
  63. // require("moment-timezone") === require("moment")
  64. export = moment;