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

typescript-example is showing error #383

Closed
pnaik1 opened this issue Aug 17, 2022 · 1 comment
Closed

typescript-example is showing error #383

pnaik1 opened this issue Aug 17, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@pnaik1
Copy link
Member

pnaik1 commented Aug 17, 2022

The typescript-example is throwing error when starting the server
Screenshot from 2022-08-17 15-55-48

The problem is found in index.ts file(promise part) , the updation of typescript package has caused this error .. Its asking for the argument
Screenshot from 2022-08-17 15-57-01
I tried to solve the issue by giving void return type to promise and it worked fine
Screenshot from 2022-08-17 15-57-18
Screenshot from 2022-08-17 15-59-36
Can you please take a look into it , whether its correct way or there is any alternative

@pnaik1 pnaik1 added the question Further information is requested label Aug 17, 2022
@helio-frota helio-frota self-assigned this Aug 17, 2022
@helio-frota
Copy link
Member

@pnaik1 thanks for the pragmatic report!

I tested locally and yeah that is happening, probably some improvements on the TypeScript compiler that now shows that as error

❯ npm start

> typescript-example@1.0.0 start
> ts-node src/index.ts

/home/lm/code/opossum-examples/more-examples/typescript-example/node_modules/ts-node/src/index.ts:859
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
src/index.ts:6:7 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?

6       resolve();

I tried to solve the issue by giving void return type to promise and it worked fine

Can you please send the pull request with the fix ?
I'm going to assign this issue to you.

@helio-frota helio-frota assigned pnaik1 and unassigned helio-frota Aug 17, 2022
@helio-frota helio-frota added bug Something isn't working and removed question Further information is requested labels Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants