chore: reformat the code base using the clang-format 1.0.15.

This commit is contained in:
Martin Probst 2015-05-27 11:52:35 -07:00
parent 96f629d441
commit 2c25055828
10 changed files with 117 additions and 139 deletions

View File

@ -752,16 +752,8 @@ export class Directive extends Injectable {
hostInjector: List<any>; hostInjector: List<any>;
constructor({ constructor({
selector, selector, properties, events, hostListeners, hostProperties, hostAttributes,
properties, hostActions, lifecycle, hostInjector, compileChildren = true,
events,
hostListeners,
hostProperties,
hostAttributes,
hostActions,
lifecycle,
hostInjector,
compileChildren = true,
}: { }: {
selector?: string, selector?: string,
properties?: any, properties?: any,
@ -773,8 +765,7 @@ export class Directive extends Injectable {
lifecycle?: List<LifecycleEvent>, lifecycle?: List<LifecycleEvent>,
hostInjector?: List<any>, hostInjector?: List<any>,
compileChildren?: boolean compileChildren?: boolean
}={}) } = {}) {
{
super(); super();
this.selector = selector; this.selector = selector;
this.properties = properties; this.properties = properties;
@ -995,21 +986,9 @@ export class Component extends Directive {
*/ */
viewInjector: List<any>; viewInjector: List<any>;
constructor({ constructor({selector, properties, events, hostListeners, hostProperties, hostAttributes,
selector, hostActions, appInjector, lifecycle, hostInjector, viewInjector,
properties, changeDetection = DEFAULT, compileChildren = true}: {
events,
hostListeners,
hostProperties,
hostAttributes,
hostActions,
appInjector,
lifecycle,
hostInjector,
viewInjector,
changeDetection = DEFAULT,
compileChildren = true
}:{
selector?: string, selector?: string,
properties?: Object, properties?: Object,
events?: List<string>, events?: List<string>,
@ -1023,8 +1002,7 @@ export class Component extends Directive {
viewInjector?: List<any>, viewInjector?: List<any>,
changeDetection?: string, changeDetection?: string,
compileChildren?: boolean compileChildren?: boolean
}={}) } = {}) {
{
super({ super({
selector: selector, selector: selector,
properties: properties, properties: properties,

View File

@ -84,18 +84,12 @@ export class View {
*/ */
renderer: string; renderer: string;
constructor({ constructor({templateUrl, template, directives, renderer}: {
templateUrl,
template,
directives,
renderer
}: {
templateUrl?: string, templateUrl?: string,
template?: string, template?: string,
directives?: List<Type | any | List<any>>, directives?: List<Type | any | List<any>>,
renderer?: string renderer?: string
} = {}) } = {}) {
{
this.templateUrl = templateUrl; this.templateUrl = templateUrl;
this.template = template; this.template = template;
this.directives = directives; this.directives = directives;

View File

@ -196,8 +196,13 @@ export class Binding {
dependencies: List<any>; dependencies: List<any>;
constructor(token, {toClass, toValue, toAlias, toFactory, toAsyncFactory, deps}: { constructor(token, {toClass, toValue, toAlias, toFactory, toAsyncFactory, deps}: {
toClass ?: Type, toValue ?: any, toAlias ?: any, toFactory ?: Function, toClass?: Type,
toAsyncFactory ?: Function, deps ?: List<any>}) { toValue?: any,
toAlias?: any,
toFactory?: Function,
toAsyncFactory?: Function,
deps?: List<any>
}) {
this.token = token; this.token = token;
this.toClass = toClass; this.toClass = toClass;
this.toValue = toValue; this.toValue = toValue;

View File

@ -44,17 +44,19 @@ export class ElementBinder {
textBindings: List<ASTWithSource>; textBindings: List<ASTWithSource>;
readAttributes: Map<string, string>; readAttributes: Map<string, string>;
constructor({ constructor({index, parentIndex, distanceToParent, directives, nestedProtoView, propertyBindings,
index, parentIndex, distanceToParent, variableBindings, eventBindings, textBindings, readAttributes}: {
directives, nestedProtoView, index?: number,
propertyBindings, variableBindings, parentIndex?: number,
eventBindings, textBindings, distanceToParent?: number,
readAttributes directives?: List<DirectiveBinder>,
}:{index?:number, parentIndex?:number, distanceToParent?:number, nestedProtoView?: ProtoViewDto,
directives?:List<DirectiveBinder>, nestedProtoView?:ProtoViewDto, propertyBindings?: Map<string, ASTWithSource>,
propertyBindings?:Map<string, ASTWithSource>, variableBindings?:Map<string, ASTWithSource>, variableBindings?: Map<string, ASTWithSource>,
eventBindings?:List<EventBinding>, textBindings?:List<ASTWithSource>, eventBindings?: List<EventBinding>,
readAttributes?:Map<string, string>}={}) { textBindings?: List<ASTWithSource>,
readAttributes?: Map<string, string>
} = {}) {
this.index = index; this.index = index;
this.parentIndex = parentIndex; this.parentIndex = parentIndex;
this.distanceToParent = distanceToParent; this.distanceToParent = distanceToParent;
@ -77,11 +79,11 @@ export class DirectiveBinder {
// with a local name // with a local name
eventBindings: List<EventBinding>; eventBindings: List<EventBinding>;
hostPropertyBindings: Map<string, ASTWithSource>; hostPropertyBindings: Map<string, ASTWithSource>;
constructor({ constructor({directiveIndex, propertyBindings, eventBindings, hostPropertyBindings}: {
directiveIndex, propertyBindings, eventBindings, hostPropertyBindings directiveIndex?: number,
}:{ propertyBindings?: Map<string, ASTWithSource>,
directiveIndex?:number, propertyBindings?:Map<string, ASTWithSource>, eventBindings?: List<EventBinding>,
eventBindings?:List<EventBinding>, hostPropertyBindings?:Map<string, ASTWithSource> hostPropertyBindings?: Map<string, ASTWithSource>
}) { }) {
this.directiveIndex = directiveIndex; this.directiveIndex = directiveIndex;
this.propertyBindings = propertyBindings; this.propertyBindings = propertyBindings;
@ -107,11 +109,11 @@ export class ProtoViewDto {
variableBindings: Map<string, string>; variableBindings: Map<string, string>;
type: number; type: number;
constructor({ constructor({render, elementBinders, variableBindings, type}: {
render, elementBinders, variableBindings, type render?: RenderProtoViewRef,
}:{ elementBinders?: List<ElementBinder>,
render?:RenderProtoViewRef, elementBinders?:List<ElementBinder>, variableBindings?: Map<string, string>,
variableBindings?:Map<string, string>, type?:number type?: number
}) { }) {
this.render = render; this.render = render;
this.elementBinders = elementBinders; this.elementBinders = elementBinders;
@ -138,15 +140,23 @@ export class DirectiveMetadata {
callOnChange: boolean; callOnChange: boolean;
callOnAllChangesDone: boolean; callOnAllChangesDone: boolean;
changeDetection: string; changeDetection: string;
constructor({ constructor({id, selector, compileChildren, events, hostListeners, hostProperties, hostAttributes,
id, selector, compileChildren, events, hostListeners, hostProperties, hostActions, properties, readAttributes, type, callOnDestroy, callOnChange,
hostAttributes, hostActions, properties, readAttributes, type, callOnAllChangesDone, changeDetection}: {
callOnDestroy, callOnChange, callOnAllChangesDone, id?: string,
changeDetection selector?: string,
}:{ compileChildren?: boolean,
id?:string, selector?:string, compileChildren?:boolean, events?:List<string>, hostListeners?:Map<string, string>, hostProperties?:Map<string, string>, events?: List<string>,
hostAttributes?:Map<string, string>, hostActions?:Map<string, string>, properties?:Map<string, string>, readAttributes?:List<string>, type?:number, hostListeners?: Map<string, string>,
callOnDestroy?:boolean, callOnChange?:boolean, callOnAllChangesDone?:boolean, hostProperties?: Map<string, string>,
hostAttributes?: Map<string, string>,
hostActions?: Map<string, string>,
properties?: Map<string, string>,
readAttributes?: List<string>,
type?: number,
callOnDestroy?: boolean,
callOnChange?: boolean,
callOnAllChangesDone?: boolean,
changeDetection?: string changeDetection?: string
}) { }) {
this.id = id; this.id = id;
@ -179,10 +189,11 @@ export class ViewDefinition {
template: string; template: string;
directives: List<DirectiveMetadata>; directives: List<DirectiveMetadata>;
constructor({ constructor({componentId, absUrl, template, directives}: {
componentId, absUrl, template, directives componentId?: string,
}:{ absUrl?: string,
componentId?:string, absUrl?:string, template?:string, directives?:List<DirectiveMetadata> template?: string,
directives?: List<DirectiveMetadata>
}) { }) {
this.componentId = componentId; this.componentId = componentId;
this.absUrl = absUrl; this.absUrl = absUrl;

View File

@ -16,19 +16,9 @@ export class ElementBinder {
propertySetters: Map<string, SetterFn>; propertySetters: Map<string, SetterFn>;
hostActions: Map<string, AST>; hostActions: Map<string, AST>;
constructor({ constructor({textNodeIndices, contentTagSelector, nestedProtoView, componentId, eventLocals,
textNodeIndices, localEvents, globalEvents, hostActions, parentIndex, distanceToParent,
contentTagSelector, propertySetters}: {
nestedProtoView,
componentId,
eventLocals,
localEvents,
globalEvents,
hostActions,
parentIndex,
distanceToParent,
propertySetters
}:{
contentTagSelector?: string, contentTagSelector?: string,
textNodeIndices?: List<number>, textNodeIndices?: List<number>,
nestedProtoView?: protoViewModule.DomProtoView, nestedProtoView?: protoViewModule.DomProtoView,

View File

@ -77,8 +77,8 @@ export class TestBed {
* @return {Promise<ViewProxy>} * @return {Promise<ViewProxy>}
*/ */
createView(component: Type, createView(component: Type,
{context = null, {context = null, html = null}: {context?: any,
html = null}: {context?: any, html?: string} = {}): Promise<ViewProxy> { html?: string} = {}): Promise<ViewProxy> {
if (isBlank(component) && isBlank(context)) { if (isBlank(component) && isBlank(context)) {
throw new BaseException('You must specified at least a component or a context'); throw new BaseException('You must specified at least a component or a context');
} }

View File

@ -9,11 +9,11 @@ var glob = require('glob');
export interface MultiCopyOptions { export interface MultiCopyOptions {
/** The path of the file to copy. */ /** The path of the file to copy. */
srcPath: string, srcPath: string;
/** A list of glob patterns of folders to copy to, matched against the input tree. */ /** A list of glob patterns of folders to copy to, matched against the input tree. */
targetPatterns: string[], targetPatterns: string[];
/** List of glob patterns to *not* copy to, matched against the matches from `targetPatterns`. */ /** List of glob patterns to *not* copy to, matched against the matches from `targetPatterns`. */
exclude?: string[], exclude?: string[];
} }
/** /**