Produce an error for an augmentation of an untyped module even if moduleNotFoundError is not defined

This commit is contained in:
Andy Hanson
2016-12-12 07:24:23 -08:00
parent 7c5c664a1c
commit 83eddb549e
4 changed files with 53 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
// @noImplicitReferences: true
// This tests that augmenting an untyped module is forbidden even in an ambient context. Contrast with `moduleAugmentationInDependency.ts`.
// @Filename: /node_modules/augmenter/index.d.ts
declare module "js" {
export const j: number;
}
export {};
// @Filename: /node_modules/js/index.js
This file is not processed.
// @Filename: /a.ts
import { } from "augmenter";