Skip to content

Commit

Permalink
fix(@schematics/angular): add required type to CanDeactivate guard (#…
Browse files Browse the repository at this point in the history
…29004)

Add missing required generic type in spec file template.

(cherry picked from commit af87780)
  • Loading branch information
guiseek authored and alan-agius4 committed Dec 2, 2024
1 parent 3d5f41f commit 28a51cc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { <%= guardType %> } from '@angular/router';
import { <%= camelize(name) %>Guard } from './<%= dasherize(name) %>.guard';

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

beforeEach(() => {
Expand Down

0 comments on commit 28a51cc

Please sign in to comment.