Permalink
Browse files

Replace null/undefined with void in moment.d.ts to fix pre 2.0 typesc…

…ript users
  • Loading branch information...
1 parent 1392ce1 commit 5a1843de5a98025aa04437df8d7e4e7200306704 @ichernev ichernev committed Nov 27, 2016
Showing with 8 additions and 8 deletions.
  1. +8 −8 moment.d.ts
View
@@ -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[];

0 comments on commit 5a1843d

Please sign in to comment.