Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'import type' errors from TypeScript in Deno 1.4.0 #32

Closed
solson opened this issue Sep 13, 2020 · 4 comments
Closed

'import type' errors from TypeScript in Deno 1.4.0 #32

solson opened this issue Sep 13, 2020 · 4 comments

Comments

@solson
Copy link

solson commented Sep 13, 2020

For some reason, when I run Deno 1.4.0's new deno test --unstable --coverage command, I get errors from Fae that didn't previously appear:

$ deno test --unstable --coverage lib_test.ts 
Debugger listening on ws://127.0.0.1:9229/ws/4f1e8421-8cec-4f18-8def-09808684fc03
Check file:///home/scott/Projects/dotfiles/scripts/.deno.test.ts
error: TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Func } from "./types.ts"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/utils/set.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Func } from "./types.ts"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/utils/curry_n.ts:3:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Func, PH } from "./utils/types.ts"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/zipWith.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { PH } from "./utils/types.ts"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/zip.ts:3:1

Found 4 errors.

I am importing only the zip function, but I assume similar issues would arise in other parts of Fae.

@solson
Copy link
Author

solson commented Sep 13, 2020

Here's a minimal repro:

$ cat foo.ts 
import { zip } from "https://deno.land/x/[email protected]/zip.ts";

$ deno test --unstable --coverage foo.ts
[... same as above ...]

$ deno --version
deno 1.4.0
v8 8.7.75
typescript 4.0.2

This must be caused by denoland/deno#7413.

Edit: More information in the v1.4 release post.

@singla-shivam
Copy link
Member

Thanks for opening the issue :)
Fix released - https://github.com/Jozty/Fae/releases/tag/v0.6.1

@solson
Copy link
Author

solson commented Sep 13, 2020

Thanks for the quick fix! Will the new version automatically show up on deno.land/x? I'm not yet seeing it at https://deno.land/x/[email protected].

@singla-shivam
Copy link
Member

Hey, the new release is available at https://deno.land/x/[email protected]/zip.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants