Joey Perrott d1ea1f4c7f build: update license headers to reference Google LLC (#37205)
Update the license headers throughout the repository to reference Google LLC
rather than Google Inc, for the required license headers.

PR Close #37205
2020-05-26 14:26:58 -04:00

54 lines
1.2 KiB
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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
*/
import {Component, ErrorHandler, Injectable, NgModule} from '@angular/core';
@Component({
selector: 'benchmark-area',
template: '<ng-content></ng-content>',
styles: [`
:host {
padding: 1;
margin: 1;
background-color: white;
width: 1000px;
display: block;
}`],
host: {
'class': 'cfc-ng2-region',
}
})
export class BenchmarkArea {
}
declare interface ExtendedWindow extends Window {
benchmarkErrors?: string[];
}
const extendedWindow = window as ExtendedWindow;
@Injectable({providedIn: 'root'})
export class BenchmarkErrorHandler implements ErrorHandler {
handleError(error: Error) {
if (!extendedWindow.benchmarkErrors) {
extendedWindow.benchmarkErrors = [];
}
extendedWindow.benchmarkErrors.push(error.message);
console.error(error);
}
}
@NgModule({
declarations: [BenchmarkArea],
exports: [BenchmarkArea],
providers: [
{provide: ErrorHandler, useClass: BenchmarkErrorHandler},
]
})
export class BenchmarkModule {
}