Skip to content

Commit 28a51cc

Browse files
guiseekalan-agius4
authored andcommitted
fix(@schematics/angular): add required type to CanDeactivate guard (#29004)
Add missing required generic type in spec file template. (cherry picked from commit af87780)
1 parent 3d5f41f commit 28a51cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: packages/schematics/angular/guard/type-files/__name@dasherize__.guard.spec.ts.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { <%= guardType %> } from '@angular/router';
44
import { <%= camelize(name) %>Guard } from './<%= dasherize(name) %>.guard';
55

66
describe('<%= camelize(name) %>Guard', () => {
7-
const executeGuard: <%= guardType %> = (...guardParameters) =>
7+
const executeGuard: <%= guardType %><% if (guardType === 'CanDeactivateFn') { %><unknown><% } %> = (...guardParameters) =>
88
TestBed.runInInjectionContext(() => <%= camelize(name) %>Guard(...guardParameters));
99

1010
beforeEach(() => {

0 commit comments

Comments
 (0)