From: Iskren Chernev Date: Sun, 27 Nov 2016 14:48:05 +0000 (+0200) Subject: Replace null/undefined with void in moment.d.ts to fix pre 2.0 typescript users X-Git-Tag: 2.17.1~4^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a1843de5a98025aa04437df8d7e4e7200306704;p=thirdparty%2Fmoment.git Replace null/undefined with void in moment.d.ts to fix pre 2.0 typescript users --- diff --git a/moment.d.ts b/moment.d.ts index 01aa7324b..2234ea731 100644 --- a/moment.d.ts +++ b/moment.d.ts @@ -68,7 +68,7 @@ declare namespace moment { sameElse?: CalendarSpecVal; // any additional properties might be used with moment.calendarFormat - [x: string]: CalendarSpecVal | undefined; + [x: string]: CalendarSpecVal | void; // undefined } type RelativeTimeSpecVal = ( @@ -248,12 +248,12 @@ declare namespace moment { overflow: number; charsLeftOver: number; nullInput: boolean; - invalidMonth: string | null; + invalidMonth: string | void; // null invalidFormat: boolean; userInvalidated: boolean; iso: boolean; parsedDateParts: any[]; - meridiem: string | null; + meridiem: string | void; // null } interface MomentParsingFlagsOpt { @@ -389,8 +389,8 @@ declare namespace moment { to: MomentInput; } - type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | null | undefined; - type DurationInputArg1 = Duration | number | string | FromTo | DurationInputObject | null | undefined; + type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined + type DurationInputArg1 = Duration | number | string | FromTo | DurationInputObject | void; // null | undefined type DurationInputArg2 = unitOfTime.DurationConstructor; type LocaleSpecifier = string | Moment | Duration | string[]; @@ -632,7 +632,7 @@ declare namespace moment { export function locale(language?: string): string; export function locale(language?: string[]): string; - export function locale(language?: string, definition?: LocaleSpecification | null | undefined): string; + export function locale(language?: string, definition?: LocaleSpecification | void): string; // null | undefined export function localeData(key?: string | string[]): Locale; @@ -684,8 +684,8 @@ declare namespace moment { */ export function now(): number; - export function defineLocale(language: string, localeSpec: LocaleSpecification | null): Locale; - export function updateLocale(language: string, localeSpec: LocaleSpecification | null): Locale; + export function defineLocale(language: string, localeSpec: LocaleSpecification | void): Locale; // null + export function updateLocale(language: string, localeSpec: LocaleSpecification | void): Locale; // null export function locales(): string[];