Files
Piotr Błażejewicz (Peter Blazejewicz) 72243e5983 🤖 Merge PR #55974 update(cypress-dotenv): expicit/implicit configuration support by @peterblazejewicz
- 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!
2021-10-12 23:03:10 -07:00

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;