Skip to content

Commit af87780

Browse files
authored
fix(@schematics/angular): add required type to CanDeactivate guard (#29004)
Add missing required generic type in spec file template.
1 parent 692e990 commit af87780

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)