@angular/core
Advanced tools
Comparing version 2.1.0-rc.0 to 2.1.0
/** | ||
* @license Angular v2.1.0-rc.0 | ||
* @license Angular v2.1.0 | ||
* (c) 2010-2016 Google, Inc. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
{ | ||
"name": "@angular/core", | ||
"version": "2.1.0-rc.0", | ||
"version": "2.1.0", | ||
"description": "Angular - the core framework", | ||
@@ -5,0 +5,0 @@ "main": "bundles/core.umd.js", |
@@ -492,2 +492,18 @@ /** | ||
* | ||
* ### Transition Aliases (`:enter` and `:leave`) | ||
* | ||
* Given that enter (insertion) and leave (removal) animations are so common, | ||
* the `transition` function accepts both `:enter` and `:leave` values which | ||
* are aliases for the `void => *` and `* => void` state changes. | ||
* | ||
* ``` | ||
* transition(":enter", [ | ||
* style({ opacity: 0 }), | ||
* animate(500, style({ opacity: 1 })) | ||
* ]) | ||
* transition(":leave", [ | ||
* animate(500, style({ opacity: 0 })) | ||
* ]) | ||
* ``` | ||
* | ||
* ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview)) | ||
@@ -494,0 +510,0 @@ * |
@@ -587,2 +587,18 @@ /** | ||
* | ||
* ### Transition Aliases (`:enter` and `:leave`) | ||
* | ||
* Given that enter (insertion) and leave (removal) animations are so common, | ||
* the `transition` function accepts both `:enter` and `:leave` values which | ||
* are aliases for the `void => *` and `* => void` state changes. | ||
* | ||
* ``` | ||
* transition(":enter", [ | ||
* style({ opacity: 0 }), | ||
* animate(500, style({ opacity: 1 })) | ||
* ]) | ||
* transition(":leave", [ | ||
* animate(500, style({ opacity: 0 })) | ||
* ]) | ||
* ``` | ||
* | ||
* ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview)) | ||
@@ -589,0 +605,0 @@ * |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { OpaqueToken } from './di'; | ||
@@ -2,0 +9,0 @@ /** |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
import { StringWrapper } from '../src/facade/lang'; | ||
import { OpaqueToken } from './di'; | ||
@@ -35,3 +34,3 @@ /** | ||
function _randomChar() { | ||
return StringWrapper.fromCharCode(97 + Math.floor(Math.random() * 25)); | ||
return String.fromCharCode(97 + Math.floor(Math.random() * 25)); | ||
} | ||
@@ -38,0 +37,0 @@ /** |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"APP_ID":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["AppId"]},"_appIdRandomProviderFactory":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"error","message":"Expression form not supported","line":26,"character":9}},"APP_ID_RANDOM_PROVIDER":{"provide":{"__symbolic":"reference","name":"APP_ID"},"useFactory":{"__symbolic":"reference","name":"_appIdRandomProviderFactory"},"deps":[]},"PLATFORM_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["Platform Initializer"]},"APP_BOOTSTRAP_LISTENER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["appBootstrapListener"]},"PACKAGE_ROOT_URL":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["Application Packages Root URL"]}}} | ||
{"__symbolic":"module","version":1,"metadata":{"APP_ID":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["AppId"]},"_appIdRandomProviderFactory":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"error","message":"Expression form not supported","line":24,"character":9}},"APP_ID_RANDOM_PROVIDER":{"provide":{"__symbolic":"reference","name":"APP_ID"},"useFactory":{"__symbolic":"reference","name":"_appIdRandomProviderFactory"},"deps":[]},"PLATFORM_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["Platform Initializer"]},"APP_BOOTSTRAP_LISTENER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["appBootstrapListener"]},"PACKAGE_ROOT_URL":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["Application Packages Root URL"]}}} |
@@ -44,3 +44,3 @@ /** | ||
this._identityChangesTail = null; | ||
this._trackByFn = isPresent(this._trackByFn) ? this._trackByFn : trackByIdentity; | ||
this._trackByFn = this._trackByFn || trackByIdentity; | ||
} | ||
@@ -47,0 +47,0 @@ Object.defineProperty(DefaultIterableDiffer.prototype, "collection", { |
@@ -80,5 +80,5 @@ /** | ||
if (generatorOrNext && typeof generatorOrNext === 'object') { | ||
schedulerFn = this.__isAsync ? function (value /** TODO #9100 */) { | ||
schedulerFn = this.__isAsync ? function (value) { | ||
setTimeout(function () { return generatorOrNext.next(value); }); | ||
} : function (value /** TODO #9100 */) { generatorOrNext.next(value); }; | ||
} : function (value) { generatorOrNext.next(value); }; | ||
if (generatorOrNext.error) { | ||
@@ -94,5 +94,4 @@ errorFn = this.__isAsync ? function (err) { setTimeout(function () { return generatorOrNext.error(err); }); } : | ||
else { | ||
schedulerFn = this.__isAsync ? function (value /** TODO #9100 */) { | ||
setTimeout(function () { return generatorOrNext(value); }); | ||
} : function (value /** TODO #9100 */) { generatorOrNext(value); }; | ||
schedulerFn = this.__isAsync ? function (value) { setTimeout(function () { return generatorOrNext(value); }); } : | ||
function (value) { generatorOrNext(value); }; | ||
if (error) { | ||
@@ -99,0 +98,0 @@ errorFn = |
@@ -47,16 +47,2 @@ | ||
export declare function stringify(token: any): string; | ||
export declare class StringWrapper { | ||
static fromCharCode(code: number): string; | ||
static charCodeAt(s: string, index: number): number; | ||
static split(s: string, regExp: RegExp): string[]; | ||
static equals(s: string, s2: string): boolean; | ||
static stripLeft(s: string, charVal: string): string; | ||
static stripRight(s: string, charVal: string): string; | ||
static replace(s: string, from: string, replace: string): string; | ||
static replaceAll(s: string, from: RegExp, replace: string): string; | ||
static slice<T>(s: string, from?: number, to?: number): string; | ||
static replaceAllMapped(s: string, from: RegExp, cb: (m: string[]) => string): string; | ||
static contains(s: string, substr: string): boolean; | ||
static compare(a: string, b: string): number; | ||
} | ||
export declare class StringJoiner { | ||
@@ -63,0 +49,0 @@ parts: string[]; |
@@ -89,70 +89,2 @@ /** | ||
} | ||
export var StringWrapper = (function () { | ||
function StringWrapper() { | ||
} | ||
StringWrapper.fromCharCode = function (code) { return String.fromCharCode(code); }; | ||
StringWrapper.charCodeAt = function (s, index) { return s.charCodeAt(index); }; | ||
StringWrapper.split = function (s, regExp) { return s.split(regExp); }; | ||
StringWrapper.equals = function (s, s2) { return s === s2; }; | ||
StringWrapper.stripLeft = function (s, charVal) { | ||
if (s && s.length) { | ||
var pos = 0; | ||
for (var i = 0; i < s.length; i++) { | ||
if (s[i] != charVal) | ||
break; | ||
pos++; | ||
} | ||
s = s.substring(pos); | ||
} | ||
return s; | ||
}; | ||
StringWrapper.stripRight = function (s, charVal) { | ||
if (s && s.length) { | ||
var pos = s.length; | ||
for (var i = s.length - 1; i >= 0; i--) { | ||
if (s[i] != charVal) | ||
break; | ||
pos--; | ||
} | ||
s = s.substring(0, pos); | ||
} | ||
return s; | ||
}; | ||
StringWrapper.replace = function (s, from, replace) { | ||
return s.replace(from, replace); | ||
}; | ||
StringWrapper.replaceAll = function (s, from, replace) { | ||
return s.replace(from, replace); | ||
}; | ||
StringWrapper.slice = function (s, from, to) { | ||
if (from === void 0) { from = 0; } | ||
if (to === void 0) { to = null; } | ||
return s.slice(from, to === null ? undefined : to); | ||
}; | ||
StringWrapper.replaceAllMapped = function (s, from, cb) { | ||
return s.replace(from, function () { | ||
var matches = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
matches[_i - 0] = arguments[_i]; | ||
} | ||
// Remove offset & string from the result array | ||
matches.splice(-2, 2); | ||
// The callback receives match, p1, ..., pn | ||
return cb(matches); | ||
}); | ||
}; | ||
StringWrapper.contains = function (s, substr) { return s.indexOf(substr) != -1; }; | ||
StringWrapper.compare = function (a, b) { | ||
if (a < b) { | ||
return -1; | ||
} | ||
else if (a > b) { | ||
return 1; | ||
} | ||
else { | ||
return 0; | ||
} | ||
}; | ||
return StringWrapper; | ||
}()); | ||
export var StringJoiner = (function () { | ||
@@ -159,0 +91,0 @@ function StringJoiner(parts) { |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"getTypeNameForDebugging":{"__symbolic":"function","parameters":["type"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"type"},"index":"name"},"right":{"__symbolic":"error","message":"Expression form not supported","line":61,"character":25}}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":80,"character":9},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":84,"character":9},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":88,"character":9},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":92,"character":9},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":100,"character":9},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"RegExp":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":265,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":265,"character":45},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":null,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":false,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":283,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":283,"character":51},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":367,"character":19}}}} | ||
{"__symbolic":"module","version":1,"metadata":{"getTypeNameForDebugging":{"__symbolic":"function","parameters":["type"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"type"},"index":"name"},"right":{"__symbolic":"error","message":"Expression form not supported","line":61,"character":25}}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":80,"character":9},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":84,"character":9},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":88,"character":9},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":92,"character":9},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":100,"character":9},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"RegExp":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":198,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":198,"character":45},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":null,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":false,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":216,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":216,"character":51},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":300,"character":19}}}} |
@@ -113,3 +113,3 @@ /** | ||
var s = this._createComponentInContainerScope(); | ||
var contextInjector = isPresent(injector) ? injector : this._element.parentInjector; | ||
var contextInjector = injector || this._element.parentInjector; | ||
var componentRef = componentFactory.create(contextInjector, projectableNodes); | ||
@@ -116,0 +116,0 @@ this.insert(componentRef.hostView, index); |
@@ -8,4 +8,4 @@ import { Type } from '../type'; | ||
isReflectionEnabled(): boolean; | ||
factory(t: Type<any>): Function; | ||
parameters(typeOrFunc: Type<any>): any[][]; | ||
factory<T>(t: Type<T>): (args: any[]) => T; | ||
parameters(type: Type<any>): any[][]; | ||
annotations(typeOrFunc: Type<any>): any[]; | ||
@@ -12,0 +12,0 @@ propMetadata(typeOrFunc: any): { |
@@ -15,16 +15,11 @@ /** | ||
ReflectionCapabilities.prototype.isReflectionEnabled = function () { return true; }; | ||
ReflectionCapabilities.prototype.factory = function (t) { | ||
var prototype = t.prototype; | ||
return function () { | ||
var args = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
args[_i - 0] = arguments[_i]; | ||
} | ||
var instance = Object.create(prototype); | ||
t.apply(instance, args); | ||
return instance; | ||
}; | ||
}; | ||
ReflectionCapabilities.prototype.factory = function (t) { return function () { | ||
var args = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
args[_i - 0] = arguments[_i]; | ||
} | ||
return new (t.bind.apply(t, [void 0].concat(args)))(); | ||
}; }; | ||
/** @internal */ | ||
ReflectionCapabilities.prototype._zipTypesAndAnnotations = function (paramTypes /** TODO #9100 */, paramAnnotations /** TODO #9100 */) { | ||
ReflectionCapabilities.prototype._zipTypesAndAnnotations = function (paramTypes, paramAnnotations) { | ||
var result; | ||
@@ -50,3 +45,3 @@ if (typeof paramTypes === 'undefined') { | ||
} | ||
if (isPresent(paramAnnotations) && isPresent(paramAnnotations[i])) { | ||
if (paramAnnotations && isPresent(paramAnnotations[i])) { | ||
result[i] = result[i].concat(paramAnnotations[i]); | ||
@@ -57,21 +52,21 @@ } | ||
}; | ||
ReflectionCapabilities.prototype.parameters = function (typeOrFunc) { | ||
ReflectionCapabilities.prototype.parameters = function (type) { | ||
// Prefer the direct API. | ||
if (isPresent(typeOrFunc.parameters)) { | ||
return typeOrFunc.parameters; | ||
if (type.parameters) { | ||
return type.parameters; | ||
} | ||
// API of tsickle for lowering decorators to properties on the class. | ||
if (isPresent(typeOrFunc.ctorParameters)) { | ||
var ctorParameters = typeOrFunc.ctorParameters; | ||
var paramTypes_1 = ctorParameters.map(function (ctorParam /** TODO #9100 */) { return ctorParam && ctorParam.type; }); | ||
var paramAnnotations_1 = ctorParameters.map(function (ctorParam /** TODO #9100 */) { | ||
if (type.ctorParameters) { | ||
var ctorParameters = type.ctorParameters; | ||
var paramTypes = ctorParameters.map(function (ctorParam) { return ctorParam && ctorParam.type; }); | ||
var paramAnnotations = ctorParameters.map(function (ctorParam) { | ||
return ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators); | ||
}); | ||
return this._zipTypesAndAnnotations(paramTypes_1, paramAnnotations_1); | ||
return this._zipTypesAndAnnotations(paramTypes, paramAnnotations); | ||
} | ||
// API for metadata created by invoking the decorators. | ||
if (isPresent(this._reflect) && isPresent(this._reflect.getMetadata)) { | ||
var paramAnnotations = this._reflect.getMetadata('parameters', typeOrFunc); | ||
var paramTypes = this._reflect.getMetadata('design:paramtypes', typeOrFunc); | ||
if (isPresent(paramTypes) || isPresent(paramAnnotations)) { | ||
var paramAnnotations = this._reflect.getMetadata('parameters', type); | ||
var paramTypes = this._reflect.getMetadata('design:paramtypes', type); | ||
if (paramTypes || paramAnnotations) { | ||
return this._zipTypesAndAnnotations(paramTypes, paramAnnotations); | ||
@@ -81,9 +76,7 @@ } | ||
// The array has to be filled with `undefined` because holes would be skipped by `some` | ||
var parameters = new Array(typeOrFunc.length); | ||
parameters.fill(undefined); | ||
return parameters; | ||
return new Array(type.length).fill(undefined); | ||
}; | ||
ReflectionCapabilities.prototype.annotations = function (typeOrFunc) { | ||
// Prefer the direct API. | ||
if (isPresent(typeOrFunc.annotations)) { | ||
if (typeOrFunc.annotations) { | ||
var annotations = typeOrFunc.annotations; | ||
@@ -96,9 +89,9 @@ if (isFunction(annotations) && annotations.annotations) { | ||
// API of tsickle for lowering decorators to properties on the class. | ||
if (isPresent(typeOrFunc.decorators)) { | ||
if (typeOrFunc.decorators) { | ||
return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators); | ||
} | ||
// API for metadata created by invoking the decorators. | ||
if (isPresent(this._reflect) && isPresent(this._reflect.getMetadata)) { | ||
if (this._reflect && this._reflect.getMetadata) { | ||
var annotations = this._reflect.getMetadata('annotations', typeOrFunc); | ||
if (isPresent(annotations)) | ||
if (annotations) | ||
return annotations; | ||
@@ -110,3 +103,3 @@ } | ||
// Prefer the direct API. | ||
if (isPresent(typeOrFunc.propMetadata)) { | ||
if (typeOrFunc.propMetadata) { | ||
var propMetadata = typeOrFunc.propMetadata; | ||
@@ -119,3 +112,3 @@ if (isFunction(propMetadata) && propMetadata.propMetadata) { | ||
// API of tsickle for lowering decorators to properties on the class. | ||
if (isPresent(typeOrFunc.propDecorators)) { | ||
if (typeOrFunc.propDecorators) { | ||
var propDecorators_1 = typeOrFunc.propDecorators; | ||
@@ -129,5 +122,5 @@ var propMetadata_1 = {}; | ||
// API for metadata created by invoking the decorators. | ||
if (isPresent(this._reflect) && isPresent(this._reflect.getMetadata)) { | ||
if (this._reflect && this._reflect.getMetadata) { | ||
var propMetadata = this._reflect.getMetadata('propMetadata', typeOrFunc); | ||
if (isPresent(propMetadata)) | ||
if (propMetadata) | ||
return propMetadata; | ||
@@ -134,0 +127,0 @@ } |
@@ -7,2 +7,2 @@ import { Reflector } from './reflector'; | ||
*/ | ||
export declare var reflector: Reflector; | ||
export declare const reflector: Reflector; |
@@ -14,3 +14,2 @@ /** | ||
import { MapWrapper } from '../facade/collection'; | ||
import { isPresent } from '../facade/lang'; | ||
import { ReflectorReader } from './reflector_reader'; | ||
@@ -64,3 +63,3 @@ /** | ||
var _this = this; | ||
if (this._usedKeys == null) { | ||
if (!this._usedKeys) { | ||
throw new Error('Usage tracking is disabled'); | ||
@@ -82,81 +81,51 @@ } | ||
if (this._containsReflectionInfo(type)) { | ||
var res = this._getReflectionInfo(type).factory; | ||
return isPresent(res) ? res : null; | ||
return this._getReflectionInfo(type).factory || null; | ||
} | ||
else { | ||
return this.reflectionCapabilities.factory(type); | ||
} | ||
return this.reflectionCapabilities.factory(type); | ||
}; | ||
Reflector.prototype.parameters = function (typeOrFunc) { | ||
if (this._injectableInfo.has(typeOrFunc)) { | ||
var res = this._getReflectionInfo(typeOrFunc).parameters; | ||
return isPresent(res) ? res : []; | ||
return this._getReflectionInfo(typeOrFunc).parameters || []; | ||
} | ||
else { | ||
return this.reflectionCapabilities.parameters(typeOrFunc); | ||
} | ||
return this.reflectionCapabilities.parameters(typeOrFunc); | ||
}; | ||
Reflector.prototype.annotations = function (typeOrFunc) { | ||
if (this._injectableInfo.has(typeOrFunc)) { | ||
var res = this._getReflectionInfo(typeOrFunc).annotations; | ||
return isPresent(res) ? res : []; | ||
return this._getReflectionInfo(typeOrFunc).annotations || []; | ||
} | ||
else { | ||
return this.reflectionCapabilities.annotations(typeOrFunc); | ||
} | ||
return this.reflectionCapabilities.annotations(typeOrFunc); | ||
}; | ||
Reflector.prototype.propMetadata = function (typeOrFunc) { | ||
if (this._injectableInfo.has(typeOrFunc)) { | ||
var res = this._getReflectionInfo(typeOrFunc).propMetadata; | ||
return isPresent(res) ? res : {}; | ||
return this._getReflectionInfo(typeOrFunc).propMetadata || {}; | ||
} | ||
else { | ||
return this.reflectionCapabilities.propMetadata(typeOrFunc); | ||
} | ||
return this.reflectionCapabilities.propMetadata(typeOrFunc); | ||
}; | ||
Reflector.prototype.interfaces = function (type) { | ||
if (this._injectableInfo.has(type)) { | ||
var res = this._getReflectionInfo(type).interfaces; | ||
return isPresent(res) ? res : []; | ||
return this._getReflectionInfo(type).interfaces || []; | ||
} | ||
else { | ||
return this.reflectionCapabilities.interfaces(type); | ||
} | ||
return this.reflectionCapabilities.interfaces(type); | ||
}; | ||
Reflector.prototype.hasLifecycleHook = function (type, lcInterface, lcProperty) { | ||
var interfaces = this.interfaces(type); | ||
if (interfaces.indexOf(lcInterface) !== -1) { | ||
if (this.interfaces(type).indexOf(lcInterface) !== -1) { | ||
return true; | ||
} | ||
else { | ||
return this.reflectionCapabilities.hasLifecycleHook(type, lcInterface, lcProperty); | ||
} | ||
return this.reflectionCapabilities.hasLifecycleHook(type, lcInterface, lcProperty); | ||
}; | ||
Reflector.prototype.getter = function (name) { | ||
if (this._getters.has(name)) { | ||
return this._getters.get(name); | ||
} | ||
else { | ||
return this.reflectionCapabilities.getter(name); | ||
} | ||
return this._getters.has(name) ? this._getters.get(name) : | ||
this.reflectionCapabilities.getter(name); | ||
}; | ||
Reflector.prototype.setter = function (name) { | ||
if (this._setters.has(name)) { | ||
return this._setters.get(name); | ||
} | ||
else { | ||
return this.reflectionCapabilities.setter(name); | ||
} | ||
return this._setters.has(name) ? this._setters.get(name) : | ||
this.reflectionCapabilities.setter(name); | ||
}; | ||
Reflector.prototype.method = function (name) { | ||
if (this._methods.has(name)) { | ||
return this._methods.get(name); | ||
} | ||
else { | ||
return this.reflectionCapabilities.method(name); | ||
} | ||
return this._methods.has(name) ? this._methods.get(name) : | ||
this.reflectionCapabilities.method(name); | ||
}; | ||
/** @internal */ | ||
Reflector.prototype._getReflectionInfo = function (typeOrFunc) { | ||
if (isPresent(this._usedKeys)) { | ||
if (this._usedKeys) { | ||
this._usedKeys.add(typeOrFunc); | ||
@@ -163,0 +132,0 @@ } |
@@ -113,3 +113,3 @@ import { Type } from '../type'; | ||
* var MyService = ng.Class({ | ||
* constructor: [String, [new Query(), QueryList], function(name, queryList) { | ||
* constructor: [String, [new Optional(), Service], function(name, myService) { | ||
* ... | ||
@@ -124,3 +124,3 @@ * }] | ||
* class MyService { | ||
* constructor(name: string, @Query() queryList: QueryList) { | ||
* constructor(name: string, @Optional() myService: Service) { | ||
* ... | ||
@@ -152,6 +152,6 @@ * } | ||
export declare function makeDecorator(name: string, props: { | ||
[key: string]: any; | ||
[name: string]: any; | ||
}, parentClass?: any, chainFn?: (fn: Function) => void): (...args: any[]) => (cls: any) => any; | ||
export declare function makeParamDecorator(name: string, props: ([string, any] | { | ||
[key: string]: any; | ||
[name: string]: any; | ||
})[], parentClass?: any): any; | ||
@@ -158,0 +158,0 @@ export declare function makePropDecorator(name: string, props: ([string, any] | { |
@@ -8,6 +8,7 @@ /** | ||
*/ | ||
import { global, isFunction, stringify } from '../facade/lang'; | ||
import { global, stringify } from '../facade/lang'; | ||
var _nextClassId = 0; | ||
var Reflect = global.Reflect; | ||
function extractAnnotation(annotation) { | ||
if (isFunction(annotation) && annotation.hasOwnProperty('annotation')) { | ||
if (typeof annotation === 'function' && annotation.hasOwnProperty('annotation')) { | ||
// it is a decorator, extract annotation | ||
@@ -23,10 +24,10 @@ annotation = annotation.annotation; | ||
} | ||
if (isFunction(fnOrArray)) { | ||
if (typeof fnOrArray === 'function') { | ||
return fnOrArray; | ||
} | ||
else if (fnOrArray instanceof Array) { | ||
if (Array.isArray(fnOrArray)) { | ||
var annotations = fnOrArray; | ||
var annoLength = annotations.length - 1; | ||
var fn = fnOrArray[annoLength]; | ||
if (!isFunction(fn)) { | ||
if (typeof fn !== 'function') { | ||
throw new Error("Last position of Class method array must be Function in key " + key + " was '" + stringify(fn) + "'"); | ||
@@ -42,3 +43,3 @@ } | ||
var annotation = annotations[i]; | ||
if (annotation instanceof Array) { | ||
if (Array.isArray(annotation)) { | ||
for (var j = 0; j < annotation.length; j++) { | ||
@@ -48,3 +49,3 @@ paramAnnotations.push(extractAnnotation(annotation[j])); | ||
} | ||
else if (isFunction(annotation)) { | ||
else if (typeof annotation === 'function') { | ||
paramAnnotations.push(extractAnnotation(annotation)); | ||
@@ -59,5 +60,3 @@ } | ||
} | ||
else { | ||
throw new Error("Only Function or Array is supported in Class definition for key '" + key + "' is '" + stringify(fnOrArray) + "'"); | ||
} | ||
throw new Error("Only Function or Array is supported in Class definition for key '" + key + "' is '" + stringify(fnOrArray) + "'"); | ||
} | ||
@@ -111,3 +110,3 @@ /** | ||
* var MyService = ng.Class({ | ||
* constructor: [String, [new Query(), QueryList], function(name, queryList) { | ||
* constructor: [String, [new Optional(), Service], function(name, myService) { | ||
* ... | ||
@@ -122,3 +121,3 @@ * }] | ||
* class MyService { | ||
* constructor(name: string, @Query() queryList: QueryList) { | ||
* constructor(name: string, @Optional() myService: Service) { | ||
* ... | ||
@@ -152,3 +151,3 @@ * } | ||
if (clsDef.hasOwnProperty('extends')) { | ||
if (isFunction(clsDef.extends)) { | ||
if (typeof clsDef.extends === 'function') { | ||
constructor.prototype = proto = | ||
@@ -162,3 +161,3 @@ Object.create(clsDef.extends.prototype); | ||
for (var key in clsDef) { | ||
if (key != 'extends' && key != 'prototype' && clsDef.hasOwnProperty(key)) { | ||
if (key !== 'extends' && key !== 'prototype' && clsDef.hasOwnProperty(key)) { | ||
proto[key] = applyParams(clsDef[key], key); | ||
@@ -176,3 +175,2 @@ } | ||
} | ||
var Reflect = global.Reflect; | ||
export function makeDecorator(name, props, parentClass, chainFn) { | ||
@@ -189,18 +187,16 @@ if (chainFn === void 0) { chainFn = null; } | ||
} | ||
else { | ||
var annotationInstance_1 = new DecoratorFactory(objOrType); | ||
var chainAnnotation = isFunction(this) && this.annotations instanceof Array ? this.annotations : []; | ||
chainAnnotation.push(annotationInstance_1); | ||
var TypeDecorator = function TypeDecorator(cls) { | ||
var annotations = Reflect.getOwnMetadata('annotations', cls) || []; | ||
annotations.push(annotationInstance_1); | ||
Reflect.defineMetadata('annotations', annotations, cls); | ||
return cls; | ||
}; | ||
TypeDecorator.annotations = chainAnnotation; | ||
TypeDecorator.Class = Class; | ||
if (chainFn) | ||
chainFn(TypeDecorator); | ||
return TypeDecorator; | ||
} | ||
var annotationInstance = new DecoratorFactory(objOrType); | ||
var chainAnnotation = typeof this === 'function' && Array.isArray(this.annotations) ? this.annotations : []; | ||
chainAnnotation.push(annotationInstance); | ||
var TypeDecorator = function TypeDecorator(cls) { | ||
var annotations = Reflect.getOwnMetadata('annotations', cls) || []; | ||
annotations.push(annotationInstance); | ||
Reflect.defineMetadata('annotations', annotations, cls); | ||
return cls; | ||
}; | ||
TypeDecorator.annotations = chainAnnotation; | ||
TypeDecorator.Class = Class; | ||
if (chainFn) | ||
chainFn(TypeDecorator); | ||
return TypeDecorator; | ||
} | ||
@@ -225,9 +221,8 @@ if (parentClass) { | ||
// plain parameter | ||
var val = !argVal || argVal === undefined ? prop[1] : argVal; | ||
_this[prop[0]] = val; | ||
_this[prop[0]] = !argVal || argVal === undefined ? prop[1] : argVal; | ||
} | ||
else { | ||
for (var propName in prop) { | ||
var val = !argVal || argVal[propName] === undefined ? prop[propName] : argVal[propName]; | ||
_this[propName] = val; | ||
_this[propName] = | ||
!argVal || argVal[propName] === undefined ? prop[propName] : argVal[propName]; | ||
} | ||
@@ -261,4 +256,3 @@ } | ||
parameters[index] = parameters[index] || []; | ||
var annotationsForParam = parameters[index]; | ||
annotationsForParam.push(annotationInstance); | ||
parameters[index].push(annotationInstance); | ||
Reflect.defineMetadata('parameters', parameters, cls); | ||
@@ -287,11 +281,9 @@ return cls; | ||
} | ||
else { | ||
var decoratorInstance = new ((_a = PropDecoratorFactory).bind.apply(_a, [void 0].concat(args)))(); | ||
return function PropDecorator(target, name) { | ||
var meta = Reflect.getOwnMetadata('propMetadata', target.constructor) || {}; | ||
meta[name] = meta[name] || []; | ||
meta[name].unshift(decoratorInstance); | ||
Reflect.defineMetadata('propMetadata', meta, target.constructor); | ||
}; | ||
} | ||
var decoratorInstance = new ((_a = PropDecoratorFactory).bind.apply(_a, [void 0].concat(args)))(); | ||
return function PropDecorator(target, name) { | ||
var meta = Reflect.getOwnMetadata('propMetadata', target.constructor) || {}; | ||
meta[name] = meta[name] || []; | ||
meta[name].unshift(decoratorInstance); | ||
Reflect.defineMetadata('propMetadata', meta, target.constructor); | ||
}; | ||
var _a; | ||
@@ -298,0 +290,0 @@ } |
@@ -14,4 +14,4 @@ /** | ||
* one or more asynchronous tasks that don't require UI updates or error handling to be handled by | ||
* Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks | ||
* can reenter the Angular zone via {@link #run}. | ||
* Angular. Such tasks can be kicked off via {@link runOutsideAngular} and if needed, these tasks | ||
* can reenter the Angular zone via {@link run}. | ||
* | ||
@@ -23,5 +23,5 @@ * <!-- TODO: add/fix links to: | ||
* | ||
* ### Example ([live demo](http://plnkr.co/edit/lY9m8HLy7z06vDoUaSN2?p=preview)) | ||
* ### Example | ||
* ``` | ||
* import {Component, View, NgZone} from '@angular/core'; | ||
* import {Component, NgZone} from '@angular/core'; | ||
* import {NgIf} from '@angular/common'; | ||
@@ -67,3 +67,2 @@ * | ||
* | ||
* | ||
* _increaseProgress(doneCallback: () => void) { | ||
@@ -84,45 +83,19 @@ * this.progress += 1; | ||
export declare class NgZone { | ||
static isInAngularZone(): boolean; | ||
static assertInAngularZone(): void; | ||
static assertNotInAngularZone(): void; | ||
private _zoneImpl; | ||
private outer; | ||
private inner; | ||
private _hasPendingMicrotasks; | ||
private _hasPendingMacrotasks; | ||
private _isStable; | ||
private _nesting; | ||
private _onUnstable; | ||
private _onMicrotaskEmpty; | ||
private _onStable; | ||
private _onErrorEvents; | ||
constructor({enableLongStackTrace}: { | ||
enableLongStackTrace?: boolean; | ||
}); | ||
private _checkStable(); | ||
static isInAngularZone(): boolean; | ||
static assertInAngularZone(): void; | ||
static assertNotInAngularZone(): void; | ||
/** | ||
* Notifies when code enters Angular Zone. This gets fired first on VM Turn. | ||
*/ | ||
onUnstable: EventEmitter<any>; | ||
/** | ||
* Notifies when there is no more microtasks enqueue in the current VM Turn. | ||
* This is a hint for Angular to do change detection, which may enqueue more microtasks. | ||
* For this reason this event can fire multiple times per VM Turn. | ||
*/ | ||
onMicrotaskEmpty: EventEmitter<any>; | ||
/** | ||
* Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which | ||
* implies we are about to relinquish VM turn. | ||
* This event gets called just once. | ||
*/ | ||
onStable: EventEmitter<any>; | ||
/** | ||
* Notify that an error has been delivered. | ||
*/ | ||
onError: EventEmitter<any>; | ||
/** | ||
* Whether there are no outstanding microtasks or microtasks. | ||
*/ | ||
isStable: boolean; | ||
/** | ||
* Whether there are any outstanding microtasks. | ||
*/ | ||
hasPendingMicrotasks: boolean; | ||
/** | ||
* Whether there are any outstanding microtasks. | ||
*/ | ||
hasPendingMacrotasks: boolean; | ||
/** | ||
* Executes the `fn` function synchronously within the Angular zone and returns value returned by | ||
@@ -132,3 +105,3 @@ * the function. | ||
* Running functions via `run` allows you to reenter Angular zone from a task that was executed | ||
* outside of the Angular zone (typically started via {@link #runOutsideAngular}). | ||
* outside of the Angular zone (typically started via {@link runOutsideAngular}). | ||
* | ||
@@ -142,4 +115,4 @@ * Any future tasks or microtasks scheduled from within this function will continue executing from | ||
/** | ||
* Same as #run, except that synchronous errors are caught and forwarded | ||
* via `onError` and not rethrown. | ||
* Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not | ||
* rethrown. | ||
*/ | ||
@@ -157,5 +130,38 @@ runGuarded(fn: () => any): any; | ||
* | ||
* Use {@link #run} to reenter the Angular zone and do work that updates the application model. | ||
* Use {@link run} to reenter the Angular zone and do work that updates the application model. | ||
*/ | ||
runOutsideAngular(fn: () => any): any; | ||
/** | ||
* Notifies when code enters Angular Zone. This gets fired first on VM Turn. | ||
*/ | ||
onUnstable: EventEmitter<any>; | ||
/** | ||
* Notifies when there is no more microtasks enqueue in the current VM Turn. | ||
* This is a hint for Angular to do change detection, which may enqueue more microtasks. | ||
* For this reason this event can fire multiple times per VM Turn. | ||
*/ | ||
onMicrotaskEmpty: EventEmitter<any>; | ||
/** | ||
* Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which | ||
* implies we are about to relinquish VM turn. | ||
* This event gets called just once. | ||
*/ | ||
onStable: EventEmitter<any>; | ||
/** | ||
* Notify that an error has been delivered. | ||
*/ | ||
onError: EventEmitter<any>; | ||
/** | ||
* Whether there are no outstanding microtasks or macrotasks. | ||
*/ | ||
isStable: boolean; | ||
hasPendingMicrotasks: boolean; | ||
hasPendingMacrotasks: boolean; | ||
private checkStable(); | ||
private forkInnerZoneWithAngularBehavior(); | ||
private onEnter(); | ||
private onLeave(); | ||
private setHasMicrotask(hasMicrotasks); | ||
private setHasMacrotask(hasMacrotasks); | ||
private triggerError(error); | ||
} |
@@ -9,3 +9,2 @@ /** | ||
import { EventEmitter } from '../facade/async'; | ||
import { NgZoneImpl } from './ng_zone_impl'; | ||
/** | ||
@@ -16,4 +15,4 @@ * An injectable service for executing work inside or outside of the Angular zone. | ||
* one or more asynchronous tasks that don't require UI updates or error handling to be handled by | ||
* Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks | ||
* can reenter the Angular zone via {@link #run}. | ||
* Angular. Such tasks can be kicked off via {@link runOutsideAngular} and if needed, these tasks | ||
* can reenter the Angular zone via {@link run}. | ||
* | ||
@@ -25,5 +24,5 @@ * <!-- TODO: add/fix links to: | ||
* | ||
* ### Example ([live demo](http://plnkr.co/edit/lY9m8HLy7z06vDoUaSN2?p=preview)) | ||
* ### Example | ||
* ``` | ||
* import {Component, View, NgZone} from '@angular/core'; | ||
* import {Component, NgZone} from '@angular/core'; | ||
* import {NgIf} from '@angular/common'; | ||
@@ -69,3 +68,2 @@ * | ||
* | ||
* | ||
* _increaseProgress(doneCallback: () => void) { | ||
@@ -87,44 +85,27 @@ * this.progress += 1; | ||
function NgZone(_a) { | ||
var _this = this; | ||
var _b = _a.enableLongStackTrace, enableLongStackTrace = _b === void 0 ? false : _b; | ||
this._hasPendingMicrotasks = false; | ||
this._hasPendingMacrotasks = false; | ||
/** @internal */ | ||
this._isStable = true; | ||
/** @internal */ | ||
this._nesting = 0; | ||
/** @internal */ | ||
this._onUnstable = new EventEmitter(false); | ||
/** @internal */ | ||
this._onMicrotaskEmpty = new EventEmitter(false); | ||
/** @internal */ | ||
this._onStable = new EventEmitter(false); | ||
/** @internal */ | ||
this._onErrorEvents = new EventEmitter(false); | ||
this._zoneImpl = new NgZoneImpl({ | ||
trace: enableLongStackTrace, | ||
onEnter: function () { | ||
// console.log('ZONE.enter', this._nesting, this._isStable); | ||
_this._nesting++; | ||
if (_this._isStable) { | ||
_this._isStable = false; | ||
_this._onUnstable.emit(null); | ||
} | ||
}, | ||
onLeave: function () { | ||
_this._nesting--; | ||
// console.log('ZONE.leave', this._nesting, this._isStable); | ||
_this._checkStable(); | ||
}, | ||
setMicrotask: function (hasMicrotasks) { | ||
_this._hasPendingMicrotasks = hasMicrotasks; | ||
_this._checkStable(); | ||
}, | ||
setMacrotask: function (hasMacrotasks) { _this._hasPendingMacrotasks = hasMacrotasks; }, | ||
onError: function (error) { return _this._onErrorEvents.emit(error); } | ||
}); | ||
if (typeof Zone == 'undefined') { | ||
throw new Error('Angular requires Zone.js prolyfill.'); | ||
} | ||
Zone.assertZonePatched(); | ||
this.outer = this.inner = Zone.current; | ||
if (Zone['wtfZoneSpec']) { | ||
this.inner = this.inner.fork(Zone['wtfZoneSpec']); | ||
} | ||
if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) { | ||
this.inner = this.inner.fork(Zone['longStackTraceZoneSpec']); | ||
} | ||
this.forkInnerZoneWithAngularBehavior(); | ||
} | ||
NgZone.isInAngularZone = function () { return NgZoneImpl.isInAngularZone(); }; | ||
NgZone.isInAngularZone = function () { return Zone.current.get('isAngularZone') === true; }; | ||
NgZone.assertInAngularZone = function () { | ||
if (!NgZoneImpl.isInAngularZone()) { | ||
if (!NgZone.isInAngularZone()) { | ||
throw new Error('Expected to be in Angular Zone, but it is not!'); | ||
@@ -134,31 +115,37 @@ } | ||
NgZone.assertNotInAngularZone = function () { | ||
if (NgZoneImpl.isInAngularZone()) { | ||
if (NgZone.isInAngularZone()) { | ||
throw new Error('Expected to not be in Angular Zone, but it is!'); | ||
} | ||
}; | ||
NgZone.prototype._checkStable = function () { | ||
var _this = this; | ||
if (this._nesting == 0) { | ||
if (!this._hasPendingMicrotasks && !this._isStable) { | ||
try { | ||
// console.log('ZONE.microtaskEmpty'); | ||
this._nesting++; | ||
this._onMicrotaskEmpty.emit(null); | ||
} | ||
finally { | ||
this._nesting--; | ||
if (!this._hasPendingMicrotasks) { | ||
try { | ||
// console.log('ZONE.stable', this._nesting, this._isStable); | ||
this.runOutsideAngular(function () { return _this._onStable.emit(null); }); | ||
} | ||
finally { | ||
this._isStable = true; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
; | ||
/** | ||
* Executes the `fn` function synchronously within the Angular zone and returns value returned by | ||
* the function. | ||
* | ||
* Running functions via `run` allows you to reenter Angular zone from a task that was executed | ||
* outside of the Angular zone (typically started via {@link runOutsideAngular}). | ||
* | ||
* Any future tasks or microtasks scheduled from within this function will continue executing from | ||
* within the Angular zone. | ||
* | ||
* If a synchronous error happens it will be rethrown and not reported via `onError`. | ||
*/ | ||
NgZone.prototype.run = function (fn) { return this.inner.run(fn); }; | ||
/** | ||
* Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not | ||
* rethrown. | ||
*/ | ||
NgZone.prototype.runGuarded = function (fn) { return this.inner.runGuarded(fn); }; | ||
/** | ||
* Executes the `fn` function synchronously in Angular's parent zone and returns value returned by | ||
* the function. | ||
* | ||
* Running functions via `runOutsideAngular` allows you to escape Angular's zone and do work that | ||
* doesn't trigger Angular change-detection or is subject to Angular's error handling. | ||
* | ||
* Any future tasks or microtasks scheduled from within this function will continue executing from | ||
* outside of the Angular zone. | ||
* | ||
* Use {@link run} to reenter the Angular zone and do work that updates the application model. | ||
*/ | ||
NgZone.prototype.runOutsideAngular = function (fn) { return this.outer.run(fn); }; | ||
Object.defineProperty(NgZone.prototype, "onUnstable", { | ||
@@ -202,3 +189,3 @@ /** | ||
/** | ||
* Whether there are no outstanding microtasks or microtasks. | ||
* Whether there are no outstanding microtasks or macrotasks. | ||
*/ | ||
@@ -210,5 +197,2 @@ get: function () { return this._isStable; }, | ||
Object.defineProperty(NgZone.prototype, "hasPendingMicrotasks", { | ||
/** | ||
* Whether there are any outstanding microtasks. | ||
*/ | ||
get: function () { return this._hasPendingMicrotasks; }, | ||
@@ -219,5 +203,2 @@ enumerable: true, | ||
Object.defineProperty(NgZone.prototype, "hasPendingMacrotasks", { | ||
/** | ||
* Whether there are any outstanding microtasks. | ||
*/ | ||
get: function () { return this._hasPendingMacrotasks; }, | ||
@@ -227,35 +208,84 @@ enumerable: true, | ||
}); | ||
/** | ||
* Executes the `fn` function synchronously within the Angular zone and returns value returned by | ||
* the function. | ||
* | ||
* Running functions via `run` allows you to reenter Angular zone from a task that was executed | ||
* outside of the Angular zone (typically started via {@link #runOutsideAngular}). | ||
* | ||
* Any future tasks or microtasks scheduled from within this function will continue executing from | ||
* within the Angular zone. | ||
* | ||
* If a synchronous error happens it will be rethrown and not reported via `onError`. | ||
*/ | ||
NgZone.prototype.run = function (fn) { return this._zoneImpl.runInner(fn); }; | ||
/** | ||
* Same as #run, except that synchronous errors are caught and forwarded | ||
* via `onError` and not rethrown. | ||
*/ | ||
NgZone.prototype.runGuarded = function (fn) { return this._zoneImpl.runInnerGuarded(fn); }; | ||
/** | ||
* Executes the `fn` function synchronously in Angular's parent zone and returns value returned by | ||
* the function. | ||
* | ||
* Running functions via `runOutsideAngular` allows you to escape Angular's zone and do work that | ||
* doesn't trigger Angular change-detection or is subject to Angular's error handling. | ||
* | ||
* Any future tasks or microtasks scheduled from within this function will continue executing from | ||
* outside of the Angular zone. | ||
* | ||
* Use {@link #run} to reenter the Angular zone and do work that updates the application model. | ||
*/ | ||
NgZone.prototype.runOutsideAngular = function (fn) { return this._zoneImpl.runOuter(fn); }; | ||
NgZone.prototype.checkStable = function () { | ||
var _this = this; | ||
if (this._nesting == 0 && !this._hasPendingMicrotasks && !this._isStable) { | ||
try { | ||
this._nesting++; | ||
this._onMicrotaskEmpty.emit(null); | ||
} | ||
finally { | ||
this._nesting--; | ||
if (!this._hasPendingMicrotasks) { | ||
try { | ||
this.runOutsideAngular(function () { return _this._onStable.emit(null); }); | ||
} | ||
finally { | ||
this._isStable = true; | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
NgZone.prototype.forkInnerZoneWithAngularBehavior = function () { | ||
var _this = this; | ||
this.inner = this.inner.fork({ | ||
name: 'angular', | ||
properties: { 'isAngularZone': true }, | ||
onInvokeTask: function (delegate, current, target, task, applyThis, applyArgs) { | ||
try { | ||
_this.onEnter(); | ||
return delegate.invokeTask(target, task, applyThis, applyArgs); | ||
} | ||
finally { | ||
_this.onLeave(); | ||
} | ||
}, | ||
onInvoke: function (delegate, current, target, callback, applyThis, applyArgs, source) { | ||
try { | ||
_this.onEnter(); | ||
return delegate.invoke(target, callback, applyThis, applyArgs, source); | ||
} | ||
finally { | ||
_this.onLeave(); | ||
} | ||
}, | ||
onHasTask: function (delegate, current, target, hasTaskState) { | ||
delegate.hasTask(target, hasTaskState); | ||
if (current === target) { | ||
// We are only interested in hasTask events which originate from our zone | ||
// (A child hasTask event is not interesting to us) | ||
if (hasTaskState.change == 'microTask') { | ||
_this.setHasMicrotask(hasTaskState.microTask); | ||
} | ||
else if (hasTaskState.change == 'macroTask') { | ||
_this.setHasMacrotask(hasTaskState.macroTask); | ||
} | ||
} | ||
}, | ||
onHandleError: function (delegate, current, target, error) { | ||
delegate.handleError(target, error); | ||
_this.triggerError(error); | ||
return false; | ||
} | ||
}); | ||
}; | ||
NgZone.prototype.onEnter = function () { | ||
this._nesting++; | ||
if (this._isStable) { | ||
this._isStable = false; | ||
this._onUnstable.emit(null); | ||
} | ||
}; | ||
NgZone.prototype.onLeave = function () { | ||
this._nesting--; | ||
this.checkStable(); | ||
}; | ||
NgZone.prototype.setHasMicrotask = function (hasMicrotasks) { | ||
this._hasPendingMicrotasks = hasMicrotasks; | ||
this.checkStable(); | ||
}; | ||
NgZone.prototype.setHasMacrotask = function (hasMacrotasks) { this._hasPendingMacrotasks = hasMacrotasks; }; | ||
NgZone.prototype.triggerError = function (error) { this._onErrorEvents.emit(error); }; | ||
return NgZone; | ||
}()); | ||
//# sourceMappingURL=ng_zone.js.map |
@@ -47,16 +47,2 @@ | ||
export declare function stringify(token: any): string; | ||
export declare class StringWrapper { | ||
static fromCharCode(code: number): string; | ||
static charCodeAt(s: string, index: number): number; | ||
static split(s: string, regExp: RegExp): string[]; | ||
static equals(s: string, s2: string): boolean; | ||
static stripLeft(s: string, charVal: string): string; | ||
static stripRight(s: string, charVal: string): string; | ||
static replace(s: string, from: string, replace: string): string; | ||
static replaceAll(s: string, from: RegExp, replace: string): string; | ||
static slice<T>(s: string, from?: number, to?: number): string; | ||
static replaceAllMapped(s: string, from: RegExp, cb: (m: string[]) => string): string; | ||
static contains(s: string, substr: string): boolean; | ||
static compare(a: string, b: string): number; | ||
} | ||
export declare class StringJoiner { | ||
@@ -63,0 +49,0 @@ parts: string[]; |
@@ -89,70 +89,2 @@ /** | ||
} | ||
export var StringWrapper = (function () { | ||
function StringWrapper() { | ||
} | ||
StringWrapper.fromCharCode = function (code) { return String.fromCharCode(code); }; | ||
StringWrapper.charCodeAt = function (s, index) { return s.charCodeAt(index); }; | ||
StringWrapper.split = function (s, regExp) { return s.split(regExp); }; | ||
StringWrapper.equals = function (s, s2) { return s === s2; }; | ||
StringWrapper.stripLeft = function (s, charVal) { | ||
if (s && s.length) { | ||
var pos = 0; | ||
for (var i = 0; i < s.length; i++) { | ||
if (s[i] != charVal) | ||
break; | ||
pos++; | ||
} | ||
s = s.substring(pos); | ||
} | ||
return s; | ||
}; | ||
StringWrapper.stripRight = function (s, charVal) { | ||
if (s && s.length) { | ||
var pos = s.length; | ||
for (var i = s.length - 1; i >= 0; i--) { | ||
if (s[i] != charVal) | ||
break; | ||
pos--; | ||
} | ||
s = s.substring(0, pos); | ||
} | ||
return s; | ||
}; | ||
StringWrapper.replace = function (s, from, replace) { | ||
return s.replace(from, replace); | ||
}; | ||
StringWrapper.replaceAll = function (s, from, replace) { | ||
return s.replace(from, replace); | ||
}; | ||
StringWrapper.slice = function (s, from, to) { | ||
if (from === void 0) { from = 0; } | ||
if (to === void 0) { to = null; } | ||
return s.slice(from, to === null ? undefined : to); | ||
}; | ||
StringWrapper.replaceAllMapped = function (s, from, cb) { | ||
return s.replace(from, function () { | ||
var matches = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
matches[_i - 0] = arguments[_i]; | ||
} | ||
// Remove offset & string from the result array | ||
matches.splice(-2, 2); | ||
// The callback receives match, p1, ..., pn | ||
return cb(matches); | ||
}); | ||
}; | ||
StringWrapper.contains = function (s, substr) { return s.indexOf(substr) != -1; }; | ||
StringWrapper.compare = function (a, b) { | ||
if (a < b) { | ||
return -1; | ||
} | ||
else if (a > b) { | ||
return 1; | ||
} | ||
else { | ||
return 0; | ||
} | ||
}; | ||
return StringWrapper; | ||
}()); | ||
export var StringJoiner = (function () { | ||
@@ -159,0 +91,0 @@ function StringJoiner(parts) { |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"getTypeNameForDebugging":{"__symbolic":"function","parameters":["type"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"type"},"index":"name"},"right":{"__symbolic":"error","message":"Expression form not supported","line":61,"character":25}}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":80,"character":9},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":84,"character":9},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":88,"character":9},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":92,"character":9},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":100,"character":9},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"RegExp":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":265,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":265,"character":45},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":null,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":false,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":283,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":283,"character":51},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":367,"character":19}}}} | ||
{"__symbolic":"module","version":1,"metadata":{"getTypeNameForDebugging":{"__symbolic":"function","parameters":["type"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"type"},"index":"name"},"right":{"__symbolic":"error","message":"Expression form not supported","line":61,"character":25}}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":80,"character":9},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":84,"character":9},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":88,"character":9},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":92,"character":9},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":100,"character":9},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"RegExp":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":198,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":198,"character":45},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":null,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":false,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":216,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":216,"character":51},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":300,"character":19}}}} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2
2133160
374
30608