Skip to content

Commit

Permalink
Add stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
aquapi committed May 22, 2024
1 parent f21fb1a commit 7bd63dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bit-js/byte",
"version": "1.3.4",
"version": "1.3.5",
"module": "index.js",
"devDependencies": {
"@types/bun": "latest",
Expand Down
11 changes: 9 additions & 2 deletions src/core/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ type HandlerRegisters<T extends RoutesRecord> = {
/**
* A plugin
*/
export interface Plugin {
plug(app: BaseByte): any;
export abstract class Plugin {
abstract plug(app: BaseByte): any;
}

/**
Expand Down Expand Up @@ -161,6 +161,13 @@ export class Byte<Rec extends RoutesRecord = []> implements ProtoSchema {
return fn;
}

/**
* Create an alter handler
*/
static alter<const T extends AlterFn>(fn: T) {
return fn;
}

/**
* Create a plugin
*/
Expand Down

0 comments on commit 7bd63dc

Please sign in to comment.