fix(core): distribute externs for testability API (#16179)

Workaround for #11119

PR Close #16179
This commit is contained in:
Alex Eagle 2017-04-19 19:28:21 -07:00 committed by Miško Hevery
parent bfd5f27525
commit da668848c9
4 changed files with 26 additions and 49 deletions

View File

@ -472,8 +472,9 @@ do
rsync -a ${OUT_DIR}/ ${NPM_DIR} rsync -a ${OUT_DIR}/ ${NPM_DIR}
fi 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="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}/ cp ${ROOT_DIR}/README.md ${NPM_DIR}/
fi fi

View File

@ -34,7 +34,7 @@ CLOSURE_ARGS=(
# Uncomment for easier debugging # Uncomment for easier debugging
# "--formatting=PRETTY_PRINT" # "--formatting=PRETTY_PRINT"
e2e/testability.externs.js node_modules/@angular/core/src/testability/testability.externs.js
node_modules/zone.js/dist/zone.js node_modules/zone.js/dist/zone.js
$(find -L vendor/rxjs -name *.js) $(find -L vendor/rxjs -name *.js)
node_modules/@angular/core/@angular/core.js node_modules/@angular/core/@angular/core.js

View File

@ -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) {};

View File

@ -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) {};