Skip to content

Commit

Permalink
fix(deno): update types for deno ^1.4.0 (#1772)
Browse files Browse the repository at this point in the history
In version 1.4 Deno adopted;

- the tsconfig setting [importsNotUsedAsValues](https://www.typescriptlang.org/tsconfig#importsNotUsedAsValues) - denoland/deno#7413
- the tsconfig setting [isolatedModules](https://www.typescriptlang.org/tsconfig#isolatedModules) when using the deno `--unstable` flag - denoland/deno#7326 ([intended to be enabled by default in 1.5](denoland/deno#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 <bencoe@google.com>
  • Loading branch information
luke-john and bcoe committed Oct 1, 2020
1 parent 4e80085 commit 0801752
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deno.ts
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
4 changes: 2 additions & 2 deletions types.ts
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 0801752

Please sign in to comment.