Skip to content

Commit

Permalink
fix: typings (#22)
Browse files Browse the repository at this point in the history
* fix: remove unless typings

* test: FastifyError should be instance of Error

* fix: remove Error expectType
  • Loading branch information
climba03003 authored Apr 19, 2021
1 parent 167f9c5 commit 062c258
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ declare namespace createError {
name: string;
statusCode?: number;
}

interface FastifyErrorConstructor {
new(a?: any, b?: any, c?: any): FastifyError;
(a?: any, b?: any, c?: any): FastifyError;
readonly prototype: FastifyError;
}

var FastifyError: FastifyErrorConstructor;
}
2 changes: 1 addition & 1 deletion index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ const err = new CustomError()
expectType<FastifyError>(err)
expectType<string>(err.code)
expectType<string>(err.message)
expectType<number>(err.statusCode!)
expectType<number>(err.statusCode!)

1 comment on commit 062c258

@climba03003
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcollina Can you help to release this one? I think I do not have privilege to do so.

Please sign in to comment.