From 080175207d281be63edf90adfe4f0568700b0bf5 Mon Sep 17 00:00:00 2001 From: Luke John Date: Fri, 2 Oct 2020 02:29:58 +0800 Subject: [PATCH] fix(deno): update types for deno ^1.4.0 (#1772) In version 1.4 Deno adopted; - the tsconfig setting [importsNotUsedAsValues](https://www.typescriptlang.org/tsconfig#importsNotUsedAsValues) - https://github.com/denoland/deno/pull/7413 - the tsconfig setting [isolatedModules](https://www.typescriptlang.org/tsconfig#isolatedModules) when using the deno `--unstable` flag - https://github.com/denoland/deno/issues/7326 ([intended to be enabled by default in 1.5](https://github.com/denoland/deno/issues/7326)) These require the use of; - type only imports for values which are only used as types (`importsNotUsedAsValues`) - type only exports for types which are re-exported (`isolatedModules`) Co-authored-by: Benjamin E. Coe --- deno.ts | 2 +- types.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deno.ts b/deno.ts index 5a33b5f15..47d8f4e76 100644 --- a/deno.ts +++ b/deno.ts @@ -1,7 +1,7 @@ // Bootstrap yargs for Deno platform: import denoPlatformShim from './lib/platform-shims/deno.ts' import { YargsWithShim } from './build/lib/yargs-factory.js' -import { YargsInstance as YargsType } from './build/lib/yargs-factory.d.ts' +import type { YargsInstance as YargsType } from './build/lib/yargs-factory.d.ts' const WrappedYargs = YargsWithShim(denoPlatformShim) diff --git a/types.ts b/types.ts index f3dba48db..5c046d378 100644 --- a/types.ts +++ b/types.ts @@ -1,7 +1,7 @@ // expose types for the benefit of Deno. -import { YargsInstance as YargsType, Arguments } from './build/lib/yargs-factory.d.ts' +import type { YargsInstance as YargsType, Arguments } from './build/lib/yargs-factory.d.ts' -export { +export type { Arguments, YargsType }