mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[@pollyjs/core] expiryStrategy option (#37254)
* [@pollyjs/core] expiryStrategy option * unit test * spacing
This commit is contained in:
parent
f41a05471c
commit
2696df1a3a
5
types/pollyjs__core/index.d.ts
vendored
5
types/pollyjs__core/index.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
// Type definitions for @pollyjs/core 2.3
|
||||
// Type definitions for @pollyjs/core 2.6
|
||||
// Project: https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/core
|
||||
// Definitions by: feinoujc <https://github.com/feinoujc>
|
||||
// Borui Gu <https://github.com/BoruiGu>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
@ -29,8 +30,10 @@ export interface PollyConfig {
|
||||
logging?: boolean;
|
||||
|
||||
recordIfMissing?: boolean;
|
||||
/** @deprecated use expiryStrategy */
|
||||
recordIfExpired?: boolean;
|
||||
recordFailedRequests?: boolean;
|
||||
expiryStrategy?: 'warn' | 'error' | 'record';
|
||||
|
||||
expiresIn?: string | null;
|
||||
timing?: ((ms: number) => Promise<void>) | (() => Promise<void>);
|
||||
|
||||
@ -5,7 +5,8 @@ const polly = new Polly('test recording', {
|
||||
mode: MODES.PASSTHROUGH,
|
||||
recordFailedRequests: true,
|
||||
adapters: ['xhr', 'fetch'],
|
||||
persister: 'rest',
|
||||
persister: 'rest',
|
||||
expiryStrategy: 'error',
|
||||
timing: Timing.relative(3),
|
||||
matchRequestsBy: {
|
||||
method: true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user