This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'.
See original GitHub issue- I am on the latest ember-intl version
- I have searched the issues of this repo and believe that this is not a duplicate
Environment
-
Ember Version: 3.25.x
-
Ember CLI Version: 3.25.x
-
Ember Intl Version: 5.6.2
-
Browser(s): n/a
-
Node Version: n/a
-
TypeScript: 4.2.4
-
Using composite TS configs
- not even sure which project in the monorepo is causing this, because this is the sole error
Steps to Reproduce
Not sure yet, but here is what I’m getting:
tsc --build --clean && tsc --build
node_modules/ember-intl/addon/-private/formatters/-base.ts:8:1 - error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'.
8 import { Formats } from '../../types';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Typescript Import Problem after updating Deno - Stack Overflow
I recently update deno from v1.3.0 to v1.4.0. Before updating, my code doesn't have ...
Read more >What is the point of importsNotUsedAsValues? What ... - Reddit
This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'. But what is the...
Read more >TypeScript 3.8 edge case type-only auto-import bug?
TS1371 : This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'. This...
Read more >TSConfig Option: importsNotUsedAsValues - TypeScript
TSConfig. importsNotUsedAsValues ... How to provide a type shape to JavaScript objects. Narrowing. How TypeScript infers types based on runtime behavior.
Read more >Leveraging Type-Only imports and exports with TypeScript 3.8
And I couldn't notice what was wrong where I was using that type: ... for cases where a type is imported only to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is the referenced code: https://github.com/ember-intl/ember-intl/blob/main/addon/-private/formatters/-base.ts#L7
and the error makes sense. The import should be
import type { Formats } ...
, but I don’t yet know why it even matters since its in node_modules, andimportsNotUsedAsValues
is a project-level setting?@buschtoens I found another potential similar issue here. I think that this is also supposed to be
import type { Formats, Translations }
?I’ll find some time today or tomorrow to open another PR.