question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feat] Better Typescript support / documentation

See original GitHub issue

The docs / examples on Typescript are very poor and hard to understand, would be nice if the examples were not half baked and had a full example on setup.

  ...(CRON_MODE === 'ts'
      ? {
            path: typescript_worker,
            worker: {
                workerData: {
                    __filename: path.join(paths.jobs, `${jobPath}.ts`)
                }
            }
        }
      : {
            path: path.join(paths.jobs, `${jobPath}.js`)
        })

This is in particular makes no sense, what is paths, where is jobPath coming from, are you actually writing this ternary for every job?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shadowgate15commented, Nov 5, 2021

Please see @breejs/ts-worker! Send feature requests and bug fixes there! I will work on getting type declarations in package soon.

1reaction
nikosgpetcommented, Nov 2, 2021

Just came up with this issue myself. Better typescript support would be greatly appreciated indeed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

feat(types): added better typescript support using vue-tsc d.ts ...
Fixes #263 Proposed Changes Added d.ts automatic generation using vue-tsc for vue component, mixins and directives using npm run build:types Added better ......
Read more >
JSDoc Reference - TypeScript: Documentation
JSDoc Reference. The list below outlines which constructs are currently supported when using JSDoc annotations to provide type information in JavaScript files.
Read more >
Angular for Beginners Course [Full Front End Tutorial with ...
... of Typescript and then you will learn about important Angular concepts such as binding, dependency injection, forms, routing, and more.
Read more >
@volar/typescript-faster | Yarn - Package Manager
TypeScript Language Service Completion API is slow when calculate auto-import. ... splitEditors setting (#2163); feat: support twoslash queries in .ts when ...
Read more >
Node.js with TypeScript
TypeScript is a really powerful tool and opens a new world of possibilities in JavaScript projects. It makes our code more secure and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found