From 7bab89cf29cfba7d4e5d609855a1c28823b687bf Mon Sep 17 00:00:00 2001 From: Daniel Byrne Date: Wed, 5 Sep 2018 15:05:42 -0700 Subject: [PATCH] adds `boolean` as an acceptable `suffix` option --- types/env-paths/env-paths-tests.ts | 4 ++++ types/env-paths/index.d.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/types/env-paths/env-paths-tests.ts b/types/env-paths/env-paths-tests.ts index b143fb47b5..5281df4cfc 100644 --- a/types/env-paths/env-paths-tests.ts +++ b/types/env-paths/env-paths-tests.ts @@ -2,3 +2,7 @@ import envPaths = require('env-paths'); // $ExpectType Paths envPaths('./'); +// $ExpectType Paths +envPaths('./', {suffix: 'test'}); +// $ExpectType Paths +envPaths('./', {suffix: false}); diff --git a/types/env-paths/index.d.ts b/types/env-paths/index.d.ts index c759f3875c..69deed7731 100644 --- a/types/env-paths/index.d.ts +++ b/types/env-paths/index.d.ts @@ -5,7 +5,7 @@ export = envPaths; -declare function envPaths(name: string, opts?: { suffix: string; }): envPaths.Paths; +declare function envPaths(name: string, opts?: { suffix: string | false }): envPaths.Paths; declare namespace envPaths { interface Paths {