mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 07:40:10 +00:00
It's not actually wrong, just misleading
This commit is contained in:
3
types/babel__core/index.d.ts
vendored
3
types/babel__core/index.d.ts
vendored
@@ -671,8 +671,9 @@ export interface EnvFunction {
|
||||
* @returns `true` if the `envName` is `===` any of the given strings
|
||||
*/
|
||||
(envName: string | ReadonlyArray<string>): boolean;
|
||||
// the official documentation is completely wrong for this one...
|
||||
// the official documentation is misleading for this one...
|
||||
// this just passes the callback to `cache.using` but with an additional argument.
|
||||
// it returns its result instead of necessarily returning a boolean.
|
||||
<T extends SimpleCacheKey>(envCallback: (envName: NonNullable<TransformOptions['envName']>) => T): T;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user