-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
24 lines (21 loc) · 1.02 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/// <reference types="cypress" />
/**
* This file is supposed to be added to "types" section of tsconfig for the library users to provide out of the box TS
* typings for the Trusted Types cypress commands.
*/
import { EnableCspThroughMetaTagOptions, ViolationType, Violation } from './types';
// https://docs.cypress.io/guides/tooling/typescript-support.html#Types-for-custom-commands
declare global {
namespace Cypress {
interface Chainable<Subject = any> {
enableCspThroughMetaTag(options?: EnableCspThroughMetaTagOptions): Chainable<void>;
catchTrustedTypesViolations(): Chainable<void>;
assertTrustedTypesViolations(expectedTypes: Partial<Violation>[]): Chainable<void>;
assertTrustedTypesViolation(expectedType: Partial<Violation>): Chainable<void>;
assertZeroTrustedTypesViolation(): Chainable<void>;
getTrustedTypesViolations(): Chainable<Violation[]>;
clearTrustedTypesViolations(): Chainable<Violation[]>;
parseCspFromMetaTags(): Chainable<JQuery<string[]>>;
}
}
}