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

Failing with TS1371 using generated routes for Koa #1360

Closed
2 of 4 tasks
tipok opened this issue Jan 2, 2023 · 5 comments
Closed
2 of 4 tasks

Failing with TS1371 using generated routes for Koa #1360

tipok opened this issue Jan 2, 2023 · 5 comments
Labels
good first issue This issue could be an easy PR for those looking to help contribute help wanted

Comments

@tipok
Copy link
Contributor

tipok commented Jan 2, 2023

While generating routes for Koa I'm getting the following error while building with tsc or running with ts-node.

error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'.

import * as KoaRouter from '@koa/router';

Sorting

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • I confirm that I

    • used the search to make sure that a similar issue hasn't already been submit

Expected Behavior

I would expect a type import as generated in the line above so it would be:

import type * as KoaRouter from '@koa/router';

Current Behavior

Currently it's generating:

import * as KoaRouter from '@koa/router';

Context (Environment)

Version of the library: 4.1.3
Version of NodeJS: v18.12.1

  • Confirm you were using yarn not npm: [x]

Breaking change?

Should not be a breaking change

@github-actions
Copy link

github-actions bot commented Jan 2, 2023

Hello there tipok 👋

Thank you for opening your very first issue in this project.

We will try to get back to you as soon as we can.👀

@WoH
Copy link
Collaborator

WoH commented Jan 2, 2023

Hi, could you confirm if this error is happening with the 5.0.0-rc.0?

@tipok
Copy link
Contributor Author

tipok commented Jan 2, 2023

Hi, unfortunately the error persists with 5.0.0-rc.0

@WoH WoH added help wanted good first issue This issue could be an easy PR for those looking to help contribute labels Jan 3, 2023
@WoH
Copy link
Collaborator

WoH commented Jan 3, 2023

Thanks for checking. Would you like to fix this via a PR?

@tipok
Copy link
Contributor Author

tipok commented Jan 3, 2023

Sure, already on it, there is an issue with IocContainerFactory and IocContainer, too. I would fix both in my PR, checking tests atm.

@WoH WoH closed this as completed in 5445934 Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This issue could be an easy PR for those looking to help contribute help wanted
Projects
None yet
Development

No branches or pull requests

2 participants