[@types/moment-timezone] Fix return type of tz function in Moment interface (#28453)

Unless moment.Moment is specified, IDEs think the function's return type is the Moment interface that contains the function.

Please fill in this template.

- [x] Use a meaningful title for the pull request. Include the name of the package modified.
- [x] Test the change in your own code. (Compile and run.)
- [ ] Add or edit tests to reflect the change. (Run with `npm test`.)
- [x] Follow the advice from the [readme](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#make-a-pull-request).
- [x] Avoid [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#common-mistakes).
- [x] Run `npm run lint package-name` (or `tsc` if no `tslint.json` is present).

Select one of these and delete the others:

If changing an existing definition:
- [ ] Provide a URL to documentation or source code which provides context for the suggested changes: <<url here>>
- [ ] Increase the version number in the header if appropriate.
- [ ] If you are making substantial changes, consider adding a `tslint.json` containing `{ "extends": "dtslint/dt.json" }`.
This commit is contained in:
Fouad Chamoun
2018-09-11 00:39:12 +02:00
committed by Ryan Cavanaugh
parent e37f8ccf0b
commit 78a53765b5

View File

@@ -58,7 +58,7 @@ declare module "moment" {
interface Moment {
tz(): string | undefined;
tz(timezone: string, keepLocalTime?: boolean): Moment;
tz(timezone: string, keepLocalTime?: boolean): moment.Moment;
zoneAbbr(): string;
zoneName(): string;
}