
committed by
Igor Minar

parent
f48b343af1
commit
0f5c70d563
@ -53,7 +53,7 @@ class Profiler {
|
||||
function forceGC() {
|
||||
Cu.forceGC();
|
||||
os.notifyObservers(null, 'child-gc-request', null);
|
||||
};
|
||||
}
|
||||
|
||||
const mod = require('sdk/page-mod');
|
||||
const data = require('sdk/self').data;
|
||||
|
@ -28,7 +28,7 @@ exports.getFirefoxProfile = function(extensionPath: string) {
|
||||
|
||||
const firefoxProfile = new FirefoxProfile();
|
||||
firefoxProfile.addExtensions([extensionPath], () => {
|
||||
firefoxProfile.encoded((encodedProfile: any) => {
|
||||
firefoxProfile.encoded((err: any, encodedProfile: string) => {
|
||||
const multiCapabilities = [{browserName: 'firefox', firefox_profile: encodedProfile}];
|
||||
deferred.resolve(multiCapabilities);
|
||||
});
|
||||
|
@ -17,7 +17,7 @@ function assertEventsEqual(actualEvents: any[], expectedEvents: any[]) {
|
||||
expect(actualEvent[key]).toEqual(expectedEvent[key]);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function main() {
|
||||
describe('convertPerfProfileToEvents', function() {
|
||||
@ -97,4 +97,4 @@ export function main() {
|
||||
assertEventsEqual(perfEvents, [{ph: 'X', ts: 1, name: 'script'}]);
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -68,4 +68,4 @@ export default {
|
||||
},
|
||||
banner: banner,
|
||||
plugins: [{resolveId: resolve}, commonjs()]
|
||||
}
|
||||
};
|
||||
|
@ -6,7 +6,6 @@
|
||||
* 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
|
||||
*/
|
||||
/* tslint:disable:no-console */
|
||||
|
||||
// Must be imported first, because Angular decorators throw on load.
|
||||
import 'reflect-metadata';
|
||||
@ -18,6 +17,7 @@ import {__NGTOOLS_PRIVATE_API_2, readConfiguration} from '@angular/compiler-cli'
|
||||
|
||||
const glob = require('glob');
|
||||
|
||||
/* tslint:disable:no-console */
|
||||
/**
|
||||
* Main method.
|
||||
* Standalone program that executes codegen using the ngtools API and tests that files were
|
||||
|
@ -6,7 +6,6 @@
|
||||
* 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
|
||||
*/
|
||||
/* tslint:disable:no-console */
|
||||
|
||||
// Must be imported first, because Angular decorators throw on load.
|
||||
import 'reflect-metadata';
|
||||
@ -16,6 +15,7 @@ import * as ts from 'typescript';
|
||||
import * as assert from 'assert';
|
||||
import {CompilerOptions, CodeGenerator, CompilerHostContext, NodeCompilerHostContext, readConfiguration} from '@angular/compiler-cli';
|
||||
|
||||
/* tslint:disable:no-console */
|
||||
/**
|
||||
* Main method.
|
||||
* Standalone program that executes the real codegen and tests that
|
||||
|
@ -329,7 +329,7 @@ export class CompilerHost extends BaseAotCompilerHost<CompilerHostContext> {
|
||||
this.moduleFileNames.set(key, result);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* We want a moduleId that will appear in import statements in the generated code.
|
||||
@ -401,7 +401,7 @@ export class CompilerHost extends BaseAotCompilerHost<CompilerHostContext> {
|
||||
private rewriteGenDirPath(filepath: string) {
|
||||
const nodeModulesIndex = filepath.indexOf(NODE_MODULES);
|
||||
if (nodeModulesIndex !== -1) {
|
||||
// If we are in node_modulse, transplant them into `genDir`.
|
||||
// If we are in node_modules, transplant them into `genDir`.
|
||||
return path.join(this.genDir, filepath.substring(nodeModulesIndex));
|
||||
} else {
|
||||
// pretend that containing file is on top of the `genDir` to normalize the paths.
|
||||
|
@ -401,7 +401,7 @@ export class TsCompilerAotCompilerTypeCheckHostAdapter extends
|
||||
|
||||
readFile = (fileName: string) => this.context.readFile(fileName);
|
||||
getDefaultLibFileName = (options: ts.CompilerOptions) =>
|
||||
this.context.getDefaultLibFileName(options);
|
||||
this.context.getDefaultLibFileName(options)
|
||||
getCurrentDirectory = () => this.context.getCurrentDirectory();
|
||||
getCanonicalFileName = (fileName: string) => this.context.getCanonicalFileName(fileName);
|
||||
useCaseSensitiveFileNames = () => this.context.useCaseSensitiveFileNames();
|
||||
|
@ -317,7 +317,6 @@ class _NodeEmitterVisitor implements StatementVisitor, ExpressionVisitor {
|
||||
ts.createConditional(
|
||||
expr.condition.visitExpression(this, null), expr.trueCase.visitExpression(this, null),
|
||||
expr.falseCase !.visitExpression(this, null)));
|
||||
;
|
||||
}
|
||||
|
||||
visitNotExpr(expr: NotExpr): RecordedNode<ts.PrefixUnaryExpression> {
|
||||
|
@ -131,7 +131,7 @@ class MockWatchHost {
|
||||
|
||||
reportDiagnostics(diags: ng.Diagnostics) { this.diagnostics.push(...diags); }
|
||||
readConfiguration() { return this.config; }
|
||||
createCompilerHost(options: ng.CompilerOptions) { return ng.createCompilerHost({options}); };
|
||||
createCompilerHost(options: ng.CompilerOptions) { return ng.createCompilerHost({options}); }
|
||||
createEmitCallback() { return undefined; }
|
||||
onFileChange(
|
||||
options: ng.CompilerOptions, listener: (event: FileChangeEvent, fileName: string) => void,
|
||||
|
@ -165,7 +165,7 @@ function convert(annotatedSource: string) {
|
||||
}
|
||||
}, undefined, undefined, transformers);
|
||||
return normalizeResult(result);
|
||||
};
|
||||
}
|
||||
|
||||
function findNode(node: ts.Node, start: number, length: number): ts.Node|undefined {
|
||||
function find(node: ts.Node): ts.Node|undefined {
|
||||
|
@ -384,7 +384,7 @@ export class AotCompiler {
|
||||
const summaryJson = new GeneratedFile(srcFileName, summaryFileName(srcFileName), json);
|
||||
if (this.options.enableSummariesForJit) {
|
||||
return [summaryJson, this._codegenSourceModule(srcFileName, forJitOutputCtx)];
|
||||
};
|
||||
}
|
||||
|
||||
return [summaryJson];
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ export class CloneVisitor implements Visitor {
|
||||
|
||||
// Visit all the nodes recursively
|
||||
export class RecurseVisitor implements Visitor {
|
||||
visitText(text: Text, context?: any): any{};
|
||||
visitText(text: Text, context?: any): any {}
|
||||
|
||||
visitContainer(container: Container, context?: any): any {
|
||||
container.children.forEach(child => child.visit(this));
|
||||
@ -151,7 +151,7 @@ export class RecurseVisitor implements Visitor {
|
||||
ph.children.forEach(child => child.visit(this));
|
||||
}
|
||||
|
||||
visitPlaceholder(ph: Placeholder, context?: any): any{};
|
||||
visitPlaceholder(ph: Placeholder, context?: any): any {}
|
||||
|
||||
visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): any{};
|
||||
visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): any {}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ export class Declaration implements Node {
|
||||
}
|
||||
|
||||
export class Doctype implements Node {
|
||||
constructor(public rootTag: string, public dtd: string){};
|
||||
constructor(public rootTag: string, public dtd: string) {}
|
||||
|
||||
visit(visitor: IVisitor): any { return visitor.visitDoctype(this); }
|
||||
}
|
||||
@ -83,7 +83,7 @@ export class Tag implements Node {
|
||||
|
||||
export class Text implements Node {
|
||||
value: string;
|
||||
constructor(unescapedValue: string) { this.value = _escapeXml(unescapedValue); };
|
||||
constructor(unescapedValue: string) { this.value = _escapeXml(unescapedValue); }
|
||||
|
||||
visit(visitor: IVisitor): any { return visitor.visitText(this); }
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ export class InterpolationConfig {
|
||||
return new InterpolationConfig(markers[0], markers[1]);
|
||||
}
|
||||
|
||||
constructor(public start: string, public end: string){};
|
||||
constructor(public start: string, public end: string) {}
|
||||
}
|
||||
|
||||
export const DEFAULT_INTERPOLATION_CONFIG: InterpolationConfig =
|
||||
|
@ -482,7 +482,7 @@ class SafeSelector {
|
||||
this.index++;
|
||||
return pseudo + replaceBy;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
restore(content: string): string {
|
||||
return content.replace(/__ph-(\d+)__/g, (ph, index) => this.placeholders[+index]);
|
||||
|
@ -27,13 +27,13 @@ export abstract class SummaryResolver<T> {
|
||||
export class JitSummaryResolver implements SummaryResolver<Type> {
|
||||
private _summaries = new Map<Type, Summary<Type>>();
|
||||
|
||||
isLibraryFile(): boolean { return false; };
|
||||
isLibraryFile(): boolean { return false; }
|
||||
toSummaryFileName(fileName: string): string { return fileName; }
|
||||
fromSummaryFileName(fileName: string): string { return fileName; }
|
||||
resolveSummary(reference: Type): Summary<Type>|null {
|
||||
return this._summaries.get(reference) || null;
|
||||
};
|
||||
}
|
||||
getSymbolsOf(): Type[] { return []; }
|
||||
getImportAs(reference: Type): Type { return reference; }
|
||||
addSummary(summary: Summary<Type>) { this._summaries.set(summary.symbol, summary); };
|
||||
addSummary(summary: Summary<Type>) { this._summaries.set(summary.symbol, summary); }
|
||||
}
|
||||
|
@ -381,10 +381,10 @@ export class MockSummaryResolver implements SummaryResolver<StaticSymbol> {
|
||||
symbol: StaticSymbol,
|
||||
importAs: StaticSymbol
|
||||
}[] = []) {}
|
||||
addSummary(summary: Summary<StaticSymbol>) { this.summaries.push(summary); };
|
||||
addSummary(summary: Summary<StaticSymbol>) { this.summaries.push(summary); }
|
||||
resolveSummary(reference: StaticSymbol): Summary<StaticSymbol> {
|
||||
return this.summaries.find(summary => summary.symbol === reference);
|
||||
};
|
||||
}
|
||||
getSymbolsOf(filePath: string): StaticSymbol[]|null {
|
||||
const symbols = this.summaries.filter(summary => summary.symbol.filePath === filePath)
|
||||
.map(summary => summary.symbol);
|
||||
|
@ -37,7 +37,7 @@ class _Humanizer implements html.Visitor {
|
||||
result: any[] = [];
|
||||
elDepth: number = 0;
|
||||
|
||||
constructor(private includeSourceSpan: boolean){};
|
||||
constructor(private includeSourceSpan: boolean) {}
|
||||
|
||||
visitElement(element: html.Element, context: any): any {
|
||||
const res = this._appendContext(element, [html.Element, element.name, this.elDepth++]);
|
||||
|
@ -2197,7 +2197,7 @@ class TemplateHumanizer implements TemplateAstVisitor {
|
||||
|
||||
constructor(
|
||||
private includeSourceSpan: boolean,
|
||||
private interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG){};
|
||||
private interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {}
|
||||
|
||||
visitNgContent(ast: NgContentAst, context: any): any {
|
||||
const res = [NgContentAst];
|
||||
|
@ -136,8 +136,8 @@ export class KeyValueDiffers {
|
||||
* {@link KeyValueDiffers} instance.
|
||||
*
|
||||
* The following example shows how to extend an existing list of factories,
|
||||
* which will only be applied to the injector for this component and its children.
|
||||
* This step is all that's required to make a new {@link KeyValueDiffer} available.
|
||||
* which will only be applied to the injector for this component and its children.
|
||||
* This step is all that's required to make a new {@link KeyValueDiffer} available.
|
||||
*
|
||||
* ### Example
|
||||
*
|
||||
|
@ -9,7 +9,9 @@
|
||||
import {Injector} from '../di';
|
||||
import {DebugContext} from '../view/index';
|
||||
|
||||
export class EventListener { constructor(public name: string, public callback: Function){}; }
|
||||
export class EventListener {
|
||||
constructor(public name: string, public callback: Function) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental All debugging apis are currently experimental.
|
||||
|
@ -167,7 +167,7 @@ class ViewContainerRef_ implements ViewContainerData {
|
||||
return null;
|
||||
}
|
||||
|
||||
get length(): number { return this._embeddedViews.length; };
|
||||
get length(): number { return this._embeddedViews.length; }
|
||||
|
||||
createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):
|
||||
EmbeddedViewRef<C> {
|
||||
|
@ -43,7 +43,6 @@ export interface NgModuleDefinition extends Definition<NgModuleDefinitionFactory
|
||||
}
|
||||
|
||||
export interface NgModuleDefinitionFactory extends DefinitionFactory<NgModuleDefinition> {}
|
||||
;
|
||||
|
||||
export interface ViewDefinition extends Definition<ViewDefinitionFactory> {
|
||||
flags: ViewFlags;
|
||||
|
@ -2052,7 +2052,9 @@ export function main() {
|
||||
exp2: any = false;
|
||||
event1: AnimationEvent;
|
||||
event2: AnimationEvent;
|
||||
// tslint:disable:semicolon
|
||||
callback1 = (event: any) => { this.event1 = event; };
|
||||
// tslint:disable:semicolon
|
||||
callback2 = (event: any) => { this.event2 = event; };
|
||||
}
|
||||
|
||||
@ -2161,7 +2163,7 @@ export function main() {
|
||||
exp: any = false;
|
||||
|
||||
@HostListener('@myAnimation2.start', ['$event'])
|
||||
callback = (event: any) => { this.event = event; };
|
||||
callback = (event: any) => { this.event = event; }
|
||||
}
|
||||
|
||||
TestBed.configureTestingModule({declarations: [Cmp]});
|
||||
|
@ -13,7 +13,7 @@ export function main() {
|
||||
|
||||
it('should provide correct function.name ', () => {
|
||||
const functionWithoutName = identity(() => function(_: any /** TODO #9100 */) {});
|
||||
function foo(_: any /** TODO #9100 */){};
|
||||
function foo(_: any /** TODO #9100 */) {}
|
||||
|
||||
expect((<any>functionWithoutName).name).toBeFalsy();
|
||||
expect((<any>foo).name).toEqual('foo');
|
||||
|
@ -1539,13 +1539,13 @@ class DirectiveLog {
|
||||
@Pipe({name: 'countingPipe'})
|
||||
class CountingPipe implements PipeTransform {
|
||||
state: number = 0;
|
||||
transform(value: any) { return `${value} state:${this.state ++}`; }
|
||||
transform(value: any) { return `${value} state:${this.state++}`; }
|
||||
}
|
||||
|
||||
@Pipe({name: 'countingImpurePipe', pure: false})
|
||||
class CountingImpurePipe implements PipeTransform {
|
||||
state: number = 0;
|
||||
transform(value: any) { return `${value} state:${this.state ++}`; }
|
||||
transform(value: any) { return `${value} state:${this.state++}`; }
|
||||
}
|
||||
|
||||
@Pipe({name: 'pipeWithOnDestroy'})
|
||||
|
@ -53,4 +53,4 @@ export function main() {
|
||||
});
|
||||
}));
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -383,7 +383,7 @@ export function main() {
|
||||
|
||||
class ChildWithCtor extends Parent {
|
||||
static ctorParameters =
|
||||
() => [{type: C, decorators: [{type: ParamDecorator, args: ['c']}]}, ];
|
||||
() => [{type: C, decorators: [{type: ParamDecorator, args: ['c']}]}, ]
|
||||
constructor() { super(); }
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,7 @@ export function main() {
|
||||
class AComp {}
|
||||
|
||||
class ChildProvider {
|
||||
ngOnDestroy() { log.push('ngOnDestroy'); };
|
||||
ngOnDestroy() { log.push('ngOnDestroy'); }
|
||||
}
|
||||
|
||||
const {view, rootNodes} = createAndGetRootNodes(compViewDef([
|
||||
|
@ -171,7 +171,7 @@ export function main() {
|
||||
const log: string[] = [];
|
||||
|
||||
class ChildProvider {
|
||||
ngOnDestroy() { log.push('ngOnDestroy'); };
|
||||
ngOnDestroy() { log.push('ngOnDestroy'); }
|
||||
}
|
||||
|
||||
const {view: parentView} = createAndGetRootNodes(compViewDef([
|
||||
|
@ -37,7 +37,7 @@ export class TestingCompiler extends Compiler {
|
||||
* Allows to pass the compile summary from AOT compilation to the JIT compiler,
|
||||
* so that it can use the code generated by AOT.
|
||||
*/
|
||||
loadAotSummaries(summaries: () => any[]) { throw unimplemented(); };
|
||||
loadAotSummaries(summaries: () => any[]) { throw unimplemented(); }
|
||||
|
||||
/**
|
||||
* Gets the component factory for the given component.
|
||||
|
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {browser, by, element, protractor} from 'protractor';
|
||||
import {$, browser, by, element, protractor} from 'protractor';
|
||||
|
||||
import {verifyNoBrowserErrors} from '../../../../_common/e2e_util';
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import {Attribute, Component, Directive, Pipe} from '@angular/core';
|
||||
|
||||
class CustomDirective {};
|
||||
class CustomDirective {}
|
||||
|
||||
// #docregion component
|
||||
@Component({selector: 'greet', template: 'Hello {{name}}!'})
|
||||
|
@ -1137,7 +1137,7 @@ class FormControlSelectNgValue {
|
||||
})
|
||||
class FormControlSelectWithCompareFn {
|
||||
compareFn:
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2;
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2
|
||||
cities = [{id: 1, name: 'SF'}, {id: 2, name: 'NY'}];
|
||||
form = new FormGroup({city: new FormControl({id: 1, name: 'SF'})});
|
||||
}
|
||||
@ -1181,7 +1181,7 @@ class FormControlSelectMultipleNgValue {
|
||||
})
|
||||
class FormControlSelectMultipleWithCompareFn {
|
||||
compareFn:
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2;
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2
|
||||
cities = [{id: 1, name: 'SF'}, {id: 2, name: 'NY'}];
|
||||
form = new FormGroup({city: new FormControl([{id: 1, name: 'SF'}])});
|
||||
}
|
||||
@ -1224,7 +1224,7 @@ class NgModelSelectWithNullForm {
|
||||
})
|
||||
class NgModelSelectWithCustomCompareFnForm {
|
||||
compareFn:
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2;
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2
|
||||
selectedCity: any = {};
|
||||
cities: any[] = [];
|
||||
}
|
||||
@ -1240,7 +1240,7 @@ class NgModelSelectWithCustomCompareFnForm {
|
||||
})
|
||||
class NgModelSelectMultipleWithCustomCompareFnForm {
|
||||
compareFn:
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2;
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2
|
||||
selectedCities: any[] = [];
|
||||
cities: any[] = [];
|
||||
}
|
||||
|
@ -78,4 +78,4 @@ export default {
|
||||
},
|
||||
banner: banner,
|
||||
plugins: [{resolveId: resolve}, commonjs(), sourcemaps()]
|
||||
}
|
||||
};
|
||||
|
@ -14,7 +14,7 @@ import {BrowserTestingModule} from '@angular/platform-browser/testing';
|
||||
import {DOMTestComponentRenderer} from './dom_test_component_renderer';
|
||||
import {platformCoreDynamicTesting} from './platform_core_dynamic_testing';
|
||||
|
||||
export * from './private_export_testing'
|
||||
export * from './private_export_testing';
|
||||
|
||||
/**
|
||||
* @stable
|
||||
|
@ -47,8 +47,8 @@ export abstract class DomAdapter {
|
||||
* Maps attribute names to their corresponding property names for cases
|
||||
* where attribute name doesn't match property name.
|
||||
*/
|
||||
get attrToPropMap(): {[key: string]: string} { return this._attrToPropMap; };
|
||||
set attrToPropMap(value: {[key: string]: string}) { this._attrToPropMap = value; };
|
||||
get attrToPropMap(): {[key: string]: string} { return this._attrToPropMap; }
|
||||
set attrToPropMap(value: {[key: string]: string}) { this._attrToPropMap = value; }
|
||||
/** @internal */
|
||||
_attrToPropMap: {[key: string]: string};
|
||||
|
||||
|
@ -65,7 +65,7 @@ export class DomRendererFactory2 implements RendererFactory2 {
|
||||
|
||||
constructor(private eventManager: EventManager, private sharedStylesHost: DomSharedStylesHost) {
|
||||
this.defaultRenderer = new DefaultDomRenderer2(eventManager);
|
||||
};
|
||||
}
|
||||
|
||||
createRenderer(element: any, type: RendererType2|null): Renderer2 {
|
||||
if (!element || !type) {
|
||||
|
@ -75,5 +75,5 @@ export abstract class EventManagerPlugin {
|
||||
throw new Error(`Unsupported event target ${target} for event ${eventName}`);
|
||||
}
|
||||
return this.addEventListener(target, eventName, handler);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -39,8 +39,10 @@ export class DominoAdapter extends BrowserDomAdapter {
|
||||
|
||||
logError(error: string) { console.error(error); }
|
||||
|
||||
// tslint:disable-next-line:no-console
|
||||
log(error: string) { console.log(error); }
|
||||
log(error: string) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
logGroup(error: string) { console.error(error); }
|
||||
|
||||
|
@ -22,7 +22,7 @@ export class ServerRendererFactory2 implements RendererFactory2 {
|
||||
private ngZone: NgZone, @Inject(DOCUMENT) private document: any,
|
||||
private sharedStylesHost: SharedStylesHost) {
|
||||
this.defaultRenderer = new DefaultServerRenderer2(document, ngZone, this.schema);
|
||||
};
|
||||
}
|
||||
|
||||
createRenderer(element: any, type: RendererType2|null): Renderer2 {
|
||||
if (!element || !type) {
|
||||
|
@ -25,8 +25,10 @@ export class WorkerDomAdapter extends DomAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-console
|
||||
log(error: any) { console.log(error); }
|
||||
log(error: any) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
logGroup(error: any) {
|
||||
if (console.group) {
|
||||
|
@ -25,4 +25,4 @@ export {UrlHandlingStrategy} from './url_handling_strategy';
|
||||
export {DefaultUrlSerializer, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';
|
||||
export {VERSION} from './version';
|
||||
|
||||
export * from './private_export'
|
||||
export * from './private_export';
|
||||
|
@ -84,7 +84,7 @@ export class RouterPreloader implements OnDestroy {
|
||||
const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));
|
||||
|
||||
this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);
|
||||
};
|
||||
}
|
||||
|
||||
setUpPreloading(): void {
|
||||
const navigations$ = filter.call(this.router.events, (e: Event) => e instanceof NavigationEnd);
|
||||
|
@ -25,7 +25,7 @@ export function provideTokenLogger(token: string, returnValue = true) {
|
||||
useFactory: (logger: Logger) => () => (logger.add(token), returnValue),
|
||||
deps: [Logger]
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export declare type ARSArgs = {
|
||||
url?: UrlSegment[],
|
||||
|
@ -61,7 +61,7 @@ export class UpgradeNg1ComponentAdapterBuilder {
|
||||
}
|
||||
ngOnDestroy() { /* needs to be here for ng2 to properly detect it */
|
||||
}
|
||||
};
|
||||
}
|
||||
this.type = MyClass;
|
||||
}
|
||||
|
||||
|
@ -85,25 +85,25 @@ export function main() {
|
||||
let element: angular.IAugmentedJQuery;
|
||||
|
||||
class mockScope implements angular.IScope {
|
||||
$new() { return this; };
|
||||
$new() { return this; }
|
||||
$watch(exp: angular.Ng1Expression, fn?: (a1?: any, a2?: any) => void) {
|
||||
return () => {};
|
||||
};
|
||||
}
|
||||
$on(event: string, fn?: (event?: any, ...args: any[]) => void) {
|
||||
return () => {};
|
||||
};
|
||||
}
|
||||
$destroy() {
|
||||
return () => {};
|
||||
};
|
||||
}
|
||||
$apply(exp?: angular.Ng1Expression) {
|
||||
return () => {};
|
||||
};
|
||||
}
|
||||
$digest() {
|
||||
return () => {};
|
||||
};
|
||||
}
|
||||
$evalAsync(exp: angular.Ng1Expression, locals?: any) {
|
||||
return () => {};
|
||||
};
|
||||
}
|
||||
$$childTail: angular.IScope;
|
||||
$$childHead: angular.IScope;
|
||||
$$nextSibling: angular.IScope;
|
||||
@ -155,7 +155,7 @@ export function main() {
|
||||
return new DowngradeComponentAdapter(
|
||||
element, attrs, scope, ngModel, parentInjector, $injector, $compile, $parse,
|
||||
componentFactory, wrapCallback);
|
||||
};
|
||||
}
|
||||
|
||||
beforeEach((inject([Compiler], (inject_compiler: Compiler) => {
|
||||
compiler = inject_compiler;
|
||||
@ -190,4 +190,4 @@ export function main() {
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -597,7 +597,7 @@ export function main() {
|
||||
|
||||
@Component({selector: 'ng2', template: 'test'})
|
||||
class Ng2 {
|
||||
};
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [Ng2],
|
||||
@ -2746,7 +2746,7 @@ export function main() {
|
||||
it('should export ng1 instance to ng2', async(() => {
|
||||
@NgModule({imports: [BrowserModule]})
|
||||
class MyNg2Module {
|
||||
};
|
||||
}
|
||||
|
||||
const adapter: UpgradeAdapter = new UpgradeAdapter(MyNg2Module);
|
||||
const module = angular.module('myExample', []);
|
||||
|
@ -105,7 +105,7 @@ export function main() {
|
||||
default:
|
||||
throw new Error('Called too many times! ' + JSON.stringify(changes));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
ng1Module.directive('ng2', downgradeComponent({
|
||||
@ -576,7 +576,7 @@ export function main() {
|
||||
|
||||
@Component({template: ''})
|
||||
class LazyLoadedComponent {
|
||||
constructor(public module: NgModuleRef<any>){};
|
||||
constructor(public module: NgModuleRef<any>) {}
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
|
Reference in New Issue
Block a user