mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Added test for module & global examples.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// @module: commonjs
|
||||
// @target: es5
|
||||
|
||||
// @filename: global.ts
|
||||
namespace n {
|
||||
function id<T>(x: T): T {
|
||||
return x;
|
||||
}
|
||||
|
||||
function templateObjectFactory() {
|
||||
return id`hello world`;
|
||||
}
|
||||
let result = templateObjectFactory() === templateObjectFactory();
|
||||
}
|
||||
// @filename: module.ts
|
||||
export { }
|
||||
function id<T>(x: T): T {
|
||||
return x;
|
||||
}
|
||||
|
||||
function templateObjectFactory() {
|
||||
return id`hello world`;
|
||||
}
|
||||
let result = templateObjectFactory() === templateObjectFactory();
|
||||
Reference in New Issue
Block a user