Search Terms: Documentation
Typescript Version: 3.5.3
Documentation here and here mention, "Neither module augmentations nor global augmentations can add new items to the top level scope - they can only “patch” existing declarations.", however I am able to "add new items".
//file-a.ts
import * as moment from 'moment';
declare module "moment" {
interface GoblyGoop {
name: string;
}
}
let y: moment.GoblyGoop;
//file-b.ts
import * as moment from 'moment';
let y: moment.GoblyGoop;