{"id":25019051,"url":"https://github.com/viniciusestevam/ts-worker","last_synced_at":"2026-03-13T22:34:54.615Z","repository":{"id":54238446,"uuid":"241149429","full_name":"viniciusestevam/ts-worker","owner":"viniciusestevam","description":":construction_worker:  A simple shorthand to use Node worker_threads with Typescript.","archived":false,"fork":false,"pushed_at":"2023-03-02T17:28:33.000Z","size":19,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T03:43:33.631Z","etag":null,"topics":["node-worker-threads","shorthand","typescript","worker","worker-threads"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viniciusestevam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-17T16:03:39.000Z","updated_at":"2023-12-29T15:19:02.000Z","dependencies_parsed_at":"2025-04-13T03:37:04.774Z","dependency_job_id":"05711d18-bf33-4ca2-b9bd-7f8b846e6692","html_url":"https://github.com/viniciusestevam/ts-worker","commit_stats":null,"previous_names":["estevam31/ts-worker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/viniciusestevam/ts-worker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusestevam%2Fts-worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusestevam%2Fts-worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusestevam%2Fts-worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusestevam%2Fts-worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viniciusestevam","download_url":"https://codeload.github.com/viniciusestevam/ts-worker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusestevam%2Fts-worker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260269438,"owners_count":22983646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["node-worker-threads","shorthand","typescript","worker","worker-threads"],"created_at":"2025-02-05T11:19:53.058Z","updated_at":"2025-10-18T10:41:19.300Z","avatar_url":"https://github.com/viniciusestevam.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :construction_worker: ts-worker\n\nA simple shorthand to use Node \u003ca href=\"https://nodejs.org/api/worker_threads.html\"\u003eworker_threads\u003c/a\u003e.\n\n**For now there is only support for \u003ca href=\"https://github.com/TypeStrong/ts-node\"\u003ets-node.\u003c/a\u003e**\n\n# Why?\n\nTypescript still doesn't offer worker_threads support. To use them, you need to call a .js file to register on ts-node and then from this file call the .ts worker. To decrease verbosity you can use this package.\n\n# Usage\n\n```bash\n  npm install ts-worker\n```\n\n- Import:\n```javascript\nimport TSWorker from 'ts-worker';\n```\n\n## Instantiating a Worker\n\n```javascript\nimport { Worker } from 'worker_threads'; // Just for typechecking\nimport TSWorker from 'ts-worker';\n\nconst worker: Worker = TSWorker('worker.ts', {\n  workerData: {\n    foo: 'bar'\n  }\n});\n\nworker.on('message', msg =\u003e console.log(msg));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniciusestevam%2Fts-worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviniciusestevam%2Fts-worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniciusestevam%2Fts-worker/lists"}