Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function run () {
var appInjector = new Injector([]);
var bindings = [
new Binding(Key.get(A), () => new A(), [], false),
new Binding(Key.get(B), () => new B(), [], false),
new Binding(Key.get(C), (a,b) => new C(a,b), [
new Dependency(Key.get(A), false, false, []),
new Dependency(Key.get(B), false, false, [])
], false)];
var proto = new ProtoElementInjector(null, 0, bindings);
for (var i = 0; i < ITERATIONS; ++i) {
var ei = proto.instantiate(null,null);
ei.instantiateDirectives(appInjector, null, null);
}
}
export function run () {
var appInjector = new Injector([]);
var bindings = [
new Binding(Key.get(A), () => new A(), [], false),
new Binding(Key.get(B), () => new B(), [], false),
new Binding(Key.get(C), (a,b) => new C(a,b), [
new Dependency(Key.get(A), false, false, []),
new Dependency(Key.get(B), false, false, [])
], false)];
var proto = new ProtoElementInjector(null, 0, bindings);
for (var i = 0; i < ITERATIONS; ++i) {
var ei = proto.instantiate(null,null);
ei.instantiateDirectives(appInjector, null, null);
}
}
constructor() {
//TODO: vsavkin Key.annotate(Key.get(View), 'static')
this.viewId = Key.get(View).id;
this.ngElementId = Key.get(NgElement).id;
}
constructor() {
//TODO: vsavkin Key.annotate(Key.get(View), 'static')
this.viewId = Key.get(View).id;
this.ngElementId = Key.get(NgElement).id;
}
export function run () {
var appInjector = new Injector([]);
var bindings = [
new Binding(Key.get(A), () => new A(), [], false),
new Binding(Key.get(B), () => new B(), [], false),
new Binding(Key.get(C), (a,b) => new C(a,b), [
new Dependency(Key.get(A), false, false, []),
new Dependency(Key.get(B), false, false, [])
], false)];
var proto = new ProtoElementInjector(null, 0, bindings);
for (var i = 0; i < ITERATIONS; ++i) {
var ei = proto.instantiate(null,null);
ei.instantiateDirectives(appInjector, null, null);
}
}