chore: adjust formatting to new clang-format.
- fixes wrapping for object literal keys called `template`. - spacing in destructuring expressions. - changes to keep trailing return types of functions closer to their function declaration. - better formatting of string literals. Closes #4828
This commit is contained in:
@ -42,6 +42,6 @@ export {
|
||||
*
|
||||
* {@example router/ts/can_activate/can_activate_example.ts region='canActivate' }
|
||||
*/
|
||||
export var CanActivate:
|
||||
(hook: (next: ComponentInstruction, prev: ComponentInstruction) => Promise<boolean>| boolean) =>
|
||||
ClassDecorator = makeDecorator(CanActivateAnnotation);
|
||||
export var CanActivate: (hook: (next: ComponentInstruction, prev: ComponentInstruction) =>
|
||||
Promise<boolean>| boolean) => ClassDecorator =
|
||||
makeDecorator(CanActivateAnnotation);
|
||||
|
@ -41,8 +41,8 @@ export class Route implements RouteDefinition {
|
||||
// added next two properties to work around https://github.com/Microsoft/TypeScript/issues/4107
|
||||
loader: Function;
|
||||
redirectTo: string;
|
||||
constructor({path, component, as, data}:
|
||||
{path: string, component: Type, as?: string, data?: {[key: string]: any}}) {
|
||||
constructor({path, component, as,
|
||||
data}: {path: string, component: Type, as?: string, data?: {[key: string]: any}}) {
|
||||
this.path = path;
|
||||
this.component = component;
|
||||
this.as = as;
|
||||
@ -115,8 +115,8 @@ export class AsyncRoute implements RouteDefinition {
|
||||
path: string;
|
||||
loader: Function;
|
||||
as: string;
|
||||
constructor({path, loader, as, data}:
|
||||
{path: string, loader: Function, as?: string, data?: {[key: string]: any}}) {
|
||||
constructor({path, loader, as,
|
||||
data}: {path: string, loader: Function, as?: string, data?: {[key: string]: any}}) {
|
||||
this.path = path;
|
||||
this.loader = loader;
|
||||
this.as = as;
|
||||
|
@ -544,8 +544,8 @@ function splitAndFlattenLinkParams(linkParams: any[]): any[] {
|
||||
}, []);
|
||||
}
|
||||
|
||||
function canActivateOne(nextInstruction: Instruction, prevInstruction: Instruction):
|
||||
Promise<boolean> {
|
||||
function canActivateOne(nextInstruction: Instruction,
|
||||
prevInstruction: Instruction): Promise<boolean> {
|
||||
var next = _resolveToTrue;
|
||||
if (isPresent(nextInstruction.child)) {
|
||||
next = canActivateOne(nextInstruction.child,
|
||||
|
Reference in New Issue
Block a user