fix linting
Angular Build / build (push) Has been cancelled

This commit is contained in:
2026-03-20 21:02:02 +01:00
parent d484239429
commit 893a13a8f2
30 changed files with 1936 additions and 3359 deletions
+13 -14
View File
@@ -1,39 +1,38 @@
type UnknownFunction = (...args: unknown[]) => unknown;
type SpyAnd = {
returnValue(value?: unknown): jasmine.Spy;
resolveTo(value?: unknown): jasmine.Spy;
rejectWith(value?: unknown): jasmine.Spy;
callFake(fn: (...args: any[]) => unknown): jasmine.Spy;
callFake(fn: UnknownFunction): jasmine.Spy;
callThrough(): jasmine.Spy;
};
type SpyCalls = {
argsFor(index: number): any[];
mostRecent(): {args: any[]};
argsFor(index: number): unknown[];
mostRecent(): {args: unknown[]};
};
declare global {
function spyOn<T = any>(object: T, methodName: any): jasmine.Spy;
function spyOn<T extends object, K extends keyof T>(object: T, methodName: K): jasmine.Spy;
function expectAsync<T>(value: Promise<T>): {
toBeResolvedTo(expected: T): Promise<void>;
toBeRejectedWithError(expected?: string | RegExp | Error): Promise<void>;
};
namespace jasmine {
type Spy<T extends (...args: any[]) => any = (...args: any[]) => any> = T & ReturnType<typeof import('vitest')['vi']['fn']> & {
and: SpyAnd;
calls: SpyCalls;
};
type Spy<T extends UnknownFunction = UnknownFunction> = T &
ReturnType<(typeof import('vitest'))['vi']['fn']> & {
and: SpyAnd;
calls: SpyCalls;
};
type SpyObj<T> = {
[K in keyof T]: T[K] extends (...args: any[]) => any ? Spy<T[K]> : T[K];
[K in keyof T]: T[K] extends UnknownFunction ? Spy<T[K]> : T[K];
};
function createSpy(name?: string): Spy;
function createSpyObj<T>(
baseName: string,
methodNames: string[] | Record<string, unknown>,
propertyValues?: Record<string, unknown>
): SpyObj<T>;
function createSpyObj<T>(baseName: string, methodNames: string[] | Record<string, unknown>, propertyValues?: Record<string, unknown>): SpyObj<T>;
function any(expectedClass: unknown): unknown;
function anything(): unknown;
function objectContaining<T>(value: Partial<T>): unknown;
+1 -1
View File
@@ -1,7 +1,7 @@
import 'vitest';
declare module 'vitest' {
interface Assertion<T = any> {
interface Assertion<T = unknown> {
toBeTrue(): T;
toBeFalse(): T;
}