diff --git a/package-lock.json b/package-lock.json
index e9a0d3b..14efcd5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@procedure-rpc/procedure.js",
- "version": "0.9.0",
+ "version": "0.10.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@procedure-rpc/procedure.js",
- "version": "0.9.0",
+ "version": "0.10.0",
"funding": [
"https://github.com/procedure-rpc/procedure.js?sponsor=1",
{
diff --git a/package.json b/package.json
index a7322ce..366a761 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@procedure-rpc/procedure.js",
- "version": "0.9.0",
+ "version": "0.10.0",
"title": "procedure.js",
"description": "The simple RPC framework for Node.js.",
"main": "./dist/index.js",
diff --git a/src/index.ts b/src/index.ts
index c5c3b5d..03863ff 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -126,13 +126,13 @@ export class Procedure
/**
* Initializes a new {@link Procedure}.
- * @param {Callback} callback The underlying callback function powering the procedure itself. The callback may be asynchronous.
+ * @param {(input: Input) => Output} callback The underlying callback function powering the procedure itself. The callback may be asynchronous.
* @param {Partial} [options] Options for a {@link Procedure}. Defaults to `{}`.
* @template Input Type of input parameter the procedure accepts. Defaults to `undefined`.
* @template Output Type of output value the procedure returns. Defaults to `undefined`.
*/
constructor(
- protected callback: Callback,
+ protected callback: (input: Input) => Output,
options: Partial = {}
) {
super();
@@ -470,16 +470,6 @@ export class Procedure
}
export default Procedure;
-/**
- * Represents a simple callback function which can take a single input parameter.
- * @template Input The type of input parameter the callback accepts. Defaults to `undefined`.
- * @template Output The type of output value the callback returns. Defaults to `undefined`.
- * @see {@link Procedure}
- */
-export type Callback = (
- input: Input
-) => Output;
-
/**
* A response from a {@link call Procedure call}.
* If the call returned successfully, the response will be of shape `{ output: Output }`, otherwise `{ error: ProcedureError }`.
diff --git a/test/index.spec.ts b/test/index.spec.ts
index ea27b32..1ca4620 100644
--- a/test/index.spec.ts
+++ b/test/index.spec.ts
@@ -1,5 +1,5 @@
import { ExtensionCodec } from '@msgpack/msgpack';
-import Procedure, { call, ping, tryPing, isPing, Callback } from '../src';
+import Procedure, { call, ping, tryPing, isPing } from '../src';
import {
ProcedureErrorCodes,
ProcedureInternalServerError,
@@ -329,7 +329,7 @@ describe('Procedure', () => {
});
describe('call(endpoint: string, input: Input | null, options: Partial): Promise