mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-17 17:48:06 +00:00
- version 2 bump - maintainer added - implicit and explicit type support for Cypress configuration - return enhanced config based on input and env vars - `env` as optional to count for eary return https://github.com/morficus/cypress-dotenv/blob/master/index.js Thanks!
26 lines
710 B
TypeScript
26 lines
710 B
TypeScript
// Type definitions for cypress-dotenv 2.0
|
|
// Project: https://github.com/morficus/cypress-dotenv
|
|
// Definitions by: Daiki Ojima <https://github.com/daikiojm>
|
|
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
import { DotenvConfigOptions } from 'dotenv';
|
|
|
|
// Cypress type
|
|
interface CypressConfig {
|
|
[key: string]: any;
|
|
}
|
|
|
|
type EnhancedConfig<T extends CypressConfig> = T & {
|
|
env?: {
|
|
[key: string]: unknown;
|
|
};
|
|
};
|
|
|
|
declare function dotenvPlugin<T extends CypressConfig>(
|
|
cypressConfig: T,
|
|
dotEnvConfig?: DotenvConfigOptions,
|
|
all?: boolean,
|
|
): EnhancedConfig<T>;
|
|
|
|
export = dotenvPlugin;
|