build: reformat repo to new clang@1.4.0 (#36613)

PR Close #36613
This commit is contained in:
Joey Perrott
2020-04-13 16:40:21 -07:00
committed by atscott
parent 5e80e7e216
commit 698b0288be
1160 changed files with 31667 additions and 24000 deletions

View File

@ -54,34 +54,40 @@ export class ServerPlatformLocation implements PlatformLocation {
}
}
getBaseHrefFromDOM(): string { return getDOM().getBaseHref(this._doc) !; }
getBaseHrefFromDOM(): string {
return getDOM().getBaseHref(this._doc)!;
}
onPopState(fn: LocationChangeListener): void {
// No-op: a state stack is not implemented, so
// no events will ever come.
}
onHashChange(fn: LocationChangeListener): void { this._hashUpdate.subscribe(fn); }
onHashChange(fn: LocationChangeListener): void {
this._hashUpdate.subscribe(fn);
}
get url(): string { return `${this.pathname}${this.search}${this.hash}`; }
get url(): string {
return `${this.pathname}${this.search}${this.hash}`;
}
private setHash(value: string, oldUrl: string) {
if (this.hash === value) {
// Don't fire events if the hash has not changed.
return;
}
(this as{hash: string}).hash = value;
(this as {hash: string}).hash = value;
const newUrl = this.url;
scheduleMicroTask(() => this._hashUpdate.next({
type: 'hashchange', state: null, oldUrl, newUrl
} as LocationChangeEvent));
scheduleMicroTask(
() => this._hashUpdate.next(
{type: 'hashchange', state: null, oldUrl, newUrl} as LocationChangeEvent));
}
replaceState(state: any, title: string, newUrl: string): void {
const oldUrl = this.url;
const parsedUrl = parseUrl(newUrl);
(this as{pathname: string}).pathname = parsedUrl.pathname;
(this as{search: string}).search = parsedUrl.search;
(this as {pathname: string}).pathname = parsedUrl.pathname;
(this as {search: string}).search = parsedUrl.search;
this.setHash(parsedUrl.hash, oldUrl);
}
@ -89,12 +95,18 @@ export class ServerPlatformLocation implements PlatformLocation {
this.replaceState(state, title, newUrl);
}
forward(): void { throw new Error('Not implemented'); }
forward(): void {
throw new Error('Not implemented');
}
back(): void { throw new Error('Not implemented'); }
back(): void {
throw new Error('Not implemented');
}
// History API isn't available on server, therefore return undefined
getState(): unknown { return undefined; }
getState(): unknown {
return undefined;
}
}
export function scheduleMicroTask(fn: Function) {