-
Notifications
You must be signed in to change notification settings - Fork 20
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
I have 2 ts(4023) errors for POST operation exported from route #156
Comments
So I finally fixed all other not related errors in my test project and can confirm that it generates docs without problems, despite showing that typescript error in editor. When I moved my test project into next-rest-framework project inside |
…mqma/next-rest-framework#156 - i just don't want to have to fork their library only for this
I'm also hitting this NrfOasData issue pages/api/v2/compute/create-server.ts:50:1 - error TS4082: Default export of the module has or is using private name 'NrfOasData'.
50 export default apiRoute({
~~~~~~~~~~~~~~~~~~~~~~~~~
51 createServer: apiRouteOperation({
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
76 .handler(handle),
~~~~~~~~~~~~~~~~~~~~~
77 });
~~~ I'm working around it for now by applying the following horrible ugly hack, which is to patch the declaration file using sed before using typescript the first time, via this (idempotent) package.json script: ...
"scripts": {
"patch-next-rest-framework": "sed -i '/^interface NrfOasData {/s/^interface/export interface/' node_modules/next-rest-framework/dist/index.d.ts",
... |
Can you still reproduce this with |
Yes, just upgraded it and can still see those errors. I also see |
tsconfig
"composite": false, |
and the errors I'm having are
Exported variable 'POST' has or is using name 'INTERNALS' from external module "/home/proj/node_modules/next-rest-framework/dist/index" but cannot be named.ts(4023)
Exported variable 'POST' has or is using name 'NrfOasData' from external module "/home/proj/node_modules/next-rest-framework/dist/index" but cannot be named.ts(4023)
Any insights? When using example app for todos everything is fine, but that app using monorepo using pnpm if I recall correctly? Not sure if it can be related to that in any way (shared TS types or something?)
When I hover over type of POST in todo app, I get this result
but when I hover over POST in my code, I just get those 2 errors instead
The text was updated successfully, but these errors were encountered: