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

Fix TS declaration file build errors. Fixes #150 #151

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EventEmitter } from 'events'
import workerThreads from 'worker_threads'
import * as workerThreads from 'worker_threads'

interface ThreadStreamOptions {
/**
Expand Down Expand Up @@ -76,9 +76,8 @@ declare class ThreadStream extends EventEmitter {
* @param args the arguments to be passed to the event handlers.
* @returns {boolean} `true` if the event had listeners, `false` otherwise.
*/
emit(eventName: string | symbol, ...args: any[]): boolean {
return super.emit(eventName, ...args);
}
emit(eventName: string | symbol, ...args: any[]): boolean;

/**
* Post a message to the Worker with specified data and an optional list of transferable objects.
*
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"why-is-node-running": "^2.2.2"
},
"scripts": {
"test": "standard && npm run transpile && tap \"test/**/*.test.*js\" && tap --ts test/*.test.*ts",
"build": "tsc --noEmit",
"test": "standard && npm run build && npm run transpile && tap \"test/**/*.test.*js\" && tap --ts test/*.test.*ts",
"test:ci": "standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts",
"test:ci:js": "tap --no-check-coverage --timeout=120 --coverage-report=lcovonly \"test/**/*.test.*js\"",
"test:ci:ts": "tap --ts --no-check-coverage --coverage-report=lcovonly \"test/**/*.test.*ts\"",
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"esModuleInterop": true
},
"files": [
"index.d.ts"
],
}
Loading