3d1c6e8f2f
* add failing test * fix(42765): require should not work in ts files
27 lines
601 B
TypeScript
27 lines
601 B
TypeScript
//// [tests/cases/compiler/resolveNameWithNamspace.ts] ////
|
|
|
|
//// [node.d.ts]
|
|
declare function require(moduleName: string): any;
|
|
|
|
declare module "assert" {
|
|
export function equal(actual: any, expected: any, message?: string | Error): void;
|
|
}
|
|
|
|
//// [ns.ts]
|
|
/// <reference path="node.d.ts"/>
|
|
namespace myAssert {
|
|
export type cool = 'cool'
|
|
}
|
|
var myAssert = require('assert')
|
|
|
|
//// [app.js]
|
|
exports.equal = myAssert.equal
|
|
exports.equal()
|
|
|
|
//// [ns.js]
|
|
/// <reference path="node.d.ts"/>
|
|
var myAssert = require('assert');
|
|
//// [app.js]
|
|
exports.equal = myAssert.equal;
|
|
exports.equal();
|