You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deno 1.4.0 introduced stricter checks on the import and export of types for all users using the --unstable flag. These (presumably) will be integrated with Deno stable in an upcoming release.
This request is to make the necessary changes to support these stricter checks, especially given eta requires the --unstable flag to run and thus is immediately broken by this latest release.
Create a file called repro.ts with the following contents:
import"https://deno.land/x/eta@v1.6.2/mod.ts";
And run deno run --unstable repro.ts.
Note there are several errors:
error: TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { TemplateFunction } from "./compile.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/containers.ts:5:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { TemplateFunction } from "./compile.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/config.ts:7:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { Cacher } from "./storage.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/config.ts:8:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { EtaConfig } from "./config.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/utils.ts:8:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { EtaConfig } from "./config.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/parse.ts:6:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { EtaConfig } from "./config.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/compile-string.ts:5:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { AstObject } from "./parse.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/compile-string.ts:6:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { EtaConfig, PartialConfig } from "./config.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/compile.ts:7:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { CallbackFn } from "./file-handlers.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/compile.ts:8:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { EtaConfig } from "./config.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/file-utils.ts:10:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { EtaConfig, PartialConfig, EtaConfigWithFilename } from "./config.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/file-handlers.ts:12:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { TemplateFunction } from "./compile.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/file-handlers.ts:13:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { EtaConfig } from "./config.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/file-helpers.ts:5:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { EtaConfig, PartialConfig } from "./config.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/render.ts:8:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { TemplateFunction } from "./compile.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/render.ts:9:1TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.import { CallbackFn } from "./file-handlers.ts";~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://deno.land/x/eta@v1.6.2/render.ts:10:1Found 16 errors.
Expected behavior
The import should work without throwing typescript errors relating to type imports and exports.
Describe the bug
Deno 1.4.0 introduced stricter checks on the import and export of types for all users using the --unstable flag. These (presumably) will be integrated with Deno stable in an upcoming release.
This request is to make the necessary changes to support these stricter checks, especially given eta requires the
--unstable
flag to run and thus is immediately broken by this latest release.See relevant section in release blog post: https://deno.land/posts/v1.4#stricter-type-checks-in-code--unstablecode
To Reproduce
Create a file called
repro.ts
with the following contents:And run
deno run --unstable repro.ts
.Note there are several errors:
Expected behavior
The import should work without throwing typescript errors relating to type imports and exports.
Screenshots
--
Package & Environment Details
eta@v1.6.2
Additional context
Encountered attempting to upgrade Opine to Deno 1.4.0
The text was updated successfully, but these errors were encountered: