refactor: remove some facades (#12335)

This commit is contained in:
Victor Berchet
2016-10-19 13:42:39 -07:00
committed by Alex Rickabaugh
parent 0ecd9b2df0
commit 76dd026447
58 changed files with 281 additions and 429 deletions

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {isFunction, stringify} from '../facade/lang';
import {stringify} from '../facade/lang';
import {Type} from '../type';
@ -51,7 +51,7 @@ export function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {
* @experimental
*/
export function resolveForwardRef(type: any): any {
if (isFunction(type) && type.hasOwnProperty('__forward_ref__') &&
if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__') &&
type.__forward_ref__ === forwardRef) {
return (<ForwardRefFn>type)();
} else {

View File

@ -7,7 +7,7 @@
*/
import {ListWrapper, MapWrapper} from '../facade/collection';
import {isArray, isBlank, isPresent} from '../facade/lang';
import {isBlank, isPresent} from '../facade/lang';
import {reflector} from '../reflection/reflection';
import {Type} from '../type';
@ -225,7 +225,7 @@ function _extractToken(
var token: any /** TODO #9100 */ = null;
var optional = false;
if (!isArray(metadata)) {
if (!Array.isArray(metadata)) {
if (metadata instanceof Inject) {
return _createDependency(metadata.token, optional, null, null, depProps);
} else {