diff --git a/build.sh b/build.sh index 6701cb8ccc..dd7aaaca92 100755 --- a/build.sh +++ b/build.sh @@ -472,8 +472,9 @@ do rsync -a ${OUT_DIR}/ ${NPM_DIR} fi - echo "====== Copy ${PACKAGE} package.json files" + echo "====== Copy ${PACKAGE} package.json and .externs.js files" rsync -am --include="package.json" --include="*/" --exclude=* ${SRC_DIR}/ ${NPM_DIR}/ + rsync -am --include="*.externs.js" --include="*/" --exclude=* ${SRC_DIR}/ ${NPM_DIR}/ cp ${ROOT_DIR}/README.md ${NPM_DIR}/ fi diff --git a/integration/hello_world__closure/bundle.sh b/integration/hello_world__closure/bundle.sh index 0b4771698d..f8b7814693 100755 --- a/integration/hello_world__closure/bundle.sh +++ b/integration/hello_world__closure/bundle.sh @@ -34,7 +34,7 @@ CLOSURE_ARGS=( # Uncomment for easier debugging # "--formatting=PRETTY_PRINT" - e2e/testability.externs.js + node_modules/@angular/core/src/testability/testability.externs.js node_modules/zone.js/dist/zone.js $(find -L vendor/rxjs -name *.js) node_modules/@angular/core/@angular/core.js diff --git a/integration/hello_world__closure/e2e/testability.externs.js b/integration/hello_world__closure/e2e/testability.externs.js deleted file mode 100644 index a17161d38e..0000000000 --- a/integration/hello_world__closure/e2e/testability.externs.js +++ /dev/null @@ -1,47 +0,0 @@ -/** @externs */ -// Workaround for #11119 -// TODO(alexeagle): these externs ought to be distributed with Angular. -/** - * @externs - * @suppress {duplicate} - */ -// NOTE: generated by tsickle, do not edit. - -/** @record @struct */ -function BrowserNodeGlobal() {} - /** @type {?} */ -BrowserNodeGlobal.prototype.getAngularTestability; - /** @type {?} */ -BrowserNodeGlobal.prototype.getAllAngularTestabilities; - /** @type {?} */ -BrowserNodeGlobal.prototype.getAllAngularRootElements; - /** @type {?} */ -BrowserNodeGlobal.prototype.frameworkStabilizers; - -/** - * @param {?} condition - * @return {?} - */ -BrowserNodeGlobal.prototype.assert = function(condition) {}; - -/** @record @struct */ -function PublicTestability() {} - -/** - * @return {?} - */ -PublicTestability.prototype.isStable = function() {}; - -/** - * @param {?} callback - * @return {?} - */ -PublicTestability.prototype.whenStable = function(callback) {}; - -/** - * @param {?} using - * @param {?} provider - * @param {?} exactMatch - * @return {?} - */ -PublicTestability.prototype.findProviders = function(using, provider, exactMatch) {}; \ No newline at end of file diff --git a/packages/core/src/testability/testability.externs.js b/packages/core/src/testability/testability.externs.js new file mode 100644 index 0000000000..5db059634d --- /dev/null +++ b/packages/core/src/testability/testability.externs.js @@ -0,0 +1,23 @@ +/** @externs */ + +/** @record @struct */ +function PublicTestability() {} + +/** + * @return {?} + */ +PublicTestability.prototype.isStable = function() {}; + +/** + * @param {?} callback + * @return {?} + */ +PublicTestability.prototype.whenStable = function(callback) {}; + +/** + * @param {?} using + * @param {?} provider + * @param {?} exactMatch + * @return {?} + */ +PublicTestability.prototype.findProviders = function(using, provider, exactMatch) {}; \ No newline at end of file