Added test for module & global examples.
This commit is contained in:
parent
5da45fb6de
commit
f94bdedc79
24
tests/cases/compiler/taggedTemplatesInModuleAndGlobal.ts
Normal file
24
tests/cases/compiler/taggedTemplatesInModuleAndGlobal.ts
Normal file
|
@ -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();
|
Loading…
Reference in a new issue