build: prepare for TypeScript 3.9 (#36989)

- Fix several compilation errors
- Update @microsoft/api-extractor to be compatible with TypeScript 3.9

PR Close #36989
This commit is contained in:
Alan Agius
2020-05-12 08:19:59 +01:00
committed by Kara Erickson
parent b58bd2bb91
commit 13ba84731f
28 changed files with 384 additions and 855 deletions

View File

@ -41,7 +41,8 @@ export function bindAction(selector: string, callback: () => void) {
export function profile(create: () => void, destroy: () => void, name: string) {
return function() {
window.console.profile(name);
// 'console.profile' is experimental and was removed from DOM lib in TS 3.9
(window.console as any).profile(name);
const noOfRuns = 150;
let durations: number[] = [];
let count = 0;
@ -52,7 +53,8 @@ export function profile(create: () => void, destroy: () => void, name: string) {
durations.push(end);
destroy();
}
window.console.profileEnd();
// 'console.profileEnd' is experimental and was removed from DOM lib in TS 3.9
(window.console as any).profileEnd();
reportProfileResults(durations, noOfRuns);
};
}