Skip to content

Commit 526996a

Browse files
authored
fix: Correct typing exports by taking a simpler exporting approach (#29)
1 parent 5b4d2d8 commit 526996a

19 files changed

+18
-17
lines changed

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"problemMatcher": [],
1212
"label": "npm: build",
13-
"detail": "pwsh -Command \"npx tsc && copy src/workers.d.ts dist/\""
13+
"detail": "Build package"
1414
}
1515
]
1616
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"types": "dist/index.d.ts",
66
"main": "dist/index.js",
77
"scripts": {
8-
"build": "pwsh -Command \"npx tsc && copy src/workers.d.ts dist/\"",
8+
"build": "npx tsc",
99
"postbuild": "publint",
1010
"deploy-pages": "cd ./pages && npm run deploy-pages",
1111
"test": "npm run test:unit && npm run test:types",

src/cancellation/CancellationSource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Event } from "../sync/Event.js";
22
import { cancellationSourceIdentityData } from "../sync/identifiers.js";
33
import { isSignaled } from "../sync/ManualResetEvent.js";
4-
import type { Token } from "../workers.js";
4+
import type { Token } from "../types.js";
55
import { TaskCancelledError } from "./TaskCancelledError.js";
66

77
/**

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ export * from './workers/AsyncWorker.js';
1212
export * from "./workers/workerListener.js";
1313
export * from './workers/WorkerTerminatedMessage.js';
1414
export * from "./workers/WorkItem.js";
15+
export type * from "./types.js";

src/sync/AutoResetEvent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Token } from "../workers.js";
1+
import type { Token } from "../types.js";
22
import { Event } from "./Event.js";
33
import { autoResetEventIdentityData, checkToken } from "./identifiers.js";
44

src/sync/ManualResetEvent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Token } from "../workers.js";
1+
import type { Token } from "../types.js";
22
import { Event } from './Event.js';
33
import { checkToken, manualResetEventIdentityData, type IdentifierData } from "./identifiers.js";
44

src/sync/Mutex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Token } from "../workers.d.ts";
1+
import type { Token } from "../types.js";
22
import { mutexIdentityData } from "./identifiers.js";
33
import { acquire, acquireAsync, SemaphoreInternal, type Releaser } from "./Semaphore.js";
44

src/sync/Semaphore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Token } from "../workers.js";
1+
import type { Token } from "../types.js";
22
import { checkToken, semaphoreIdentityData, type IdentifierData } from "./identifiers.js";
33
import { SyncObject } from "./SyncObject.js";
44

src/sync/SyncObject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Token } from "../workers.d.ts";
1+
import type { Token } from "../types.js";
22

33
/**
44
* Base class for synchronization objects.

src/sync/identifiers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Token } from "../workers.d.ts";
1+
import type { Token } from "../types.js";
22

33
export type IdentifierData = [
44
number,

0 commit comments

Comments
 (0)