TypeScript/tests/cases/compiler/moduleAugmentationDuringSyntheticDefaultCheck.ts
Wesley Wigham 89de4c9a3a
Only apply global augmentations before globals are available (#21563)
* Only apply global augmentations before globals are available

* Add detailed comment explaining the split of global/nonglobal augmentations

* Remove trailing whitespace
2018-02-02 18:44:54 -08:00

35 lines
838 B
TypeScript

// @noImplicitReferences: true
// @esModuleInterop: true
// @filename: node_modules/moment/index.d.ts
declare function moment(): moment.Moment;
declare namespace moment {
interface Moment extends Object {
valueOf(): number;
}
}
export = moment;
// @filename: node_modules/moment-timezone/index.d.ts
import * as moment from 'moment';
export = moment;
declare module "moment" {
interface Moment {
tz(): string;
}
}
// @filename: idx.ts
import * as _moment from "moment";
declare module "moment" {
interface Moment {
strftime(pattern: string): string;
}
}
declare module "moment-timezone" {
interface Moment {
strftime(pattern: string): string;
}
}
// @filename: idx.test.ts
/// <reference path="./idx" />
import moment = require("moment-timezone");