Skip to content

Commit e3e2749

Browse files
committed
JS: Add some tests with Closure modules
1 parent 44e6f85 commit e3e2749

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
goog.declareModuleId("closure.es")
2+
3+
const Bar = goog.require('closure.reexported.Bar');
4+
5+
export { Bar }
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
goog.module("closure.lib")
2+
3+
exports.Foo = goog.require('closure.reexported.Foo');
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
goog.module("closure.use")
2+
3+
const lib = goog.require("closure.lib");
4+
const es = goog.require("closure.es");
5+
6+
/**
7+
* @param {lib.Foo} x
8+
*/
9+
function t1(x) { // $ hasUnderlyingType=closure.reexported.Foo hasUnderlyingType=closure.lib.Foo
10+
}
11+
12+
/**
13+
* @param {es.Bar} x
14+
*/
15+
function t2(x) { // $ hasUnderlyingType=closure.reexported.Bar hasUnderlyingType=closure.es.Bar
16+
}

0 commit comments

Comments
 (0)