refactor(router): compile router cleanly with TypeScript 2.4 (#18465)

This commit is contained in:
Chuck Jazdzewski
2017-08-02 17:32:02 -07:00
committed by Victor Berchet
parent 71de92a189
commit 4176832266
4 changed files with 4 additions and 4 deletions

View File

@ -45,7 +45,7 @@ describe('config', () => {
expect(() => {
validateConfig([
{path: 'a', component: ComponentA},
[{path: 'b', component: ComponentB}, {path: 'c', component: ComponentC}]
[{path: 'b', component: ComponentB}, {path: 'c', component: ComponentC}] as any
]);
}).toThrowError(`Invalid configuration of route '': Array cannot be specified`);
});

View File

@ -1820,7 +1820,7 @@ describe('Integration', () => {
function delayPromise(delay: number): Promise<boolean> {
let resolve: (val: boolean) => void;
const promise = new Promise(res => resolve = res);
const promise = new Promise<boolean>(res => resolve = res);
setTimeout(() => resolve(true), delay);
return promise;
}