Files
DefinitelyTyped/moment-timezone
Sean Kelley 1ec036686e Make moment's typings for parsing stricter and also allow them to accept union types.
These changes do two things.

1. Replace very lax typings like `any[]` with stricter, more-correct versions. In particular,
the ISO_8601 constant, while /technically/ a void function, is actually an opaque sentinel
that a consumer should not know anything about it. The function type was replaced with a
sentinel type using the principle of "brands" that can be seen in the Typescript compiler:
413d9a639f/src/compiler/types.ts (L9)

2. Replace the many overloads of the parsing methods with a smaller representative set that
uses union types instead. Aside from succinctness, this allows callers to provide a union
type as the argument, as long as it matches, which was not possible before (Typescript does
not explode the union type to see if overloads cover all the possibilities).
2016-03-29 15:03:48 -07:00
..
2016-02-25 14:19:08 +05:30