mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
Merge pull request #32354 from RazzM13/master
[@types/feathersjs__errors] Added typings for the missing "code", "className" and "data" property members of the FeathersError object.
This commit is contained in:
Vendored
+17
-2
@@ -1,11 +1,26 @@
|
||||
// Type definitions for @feathersjs/errors 3.2
|
||||
// Type definitions for @feathersjs/errors 3.3
|
||||
// Project: http://feathersjs.com/
|
||||
// Definitions by: Jan Lohage <https://github.com/j2L4e>
|
||||
// RazzM13 <https://github.com/RazzM13>
|
||||
// Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
export interface FeathersErrorJSON {
|
||||
readonly name: string;
|
||||
readonly message: string;
|
||||
readonly code: number;
|
||||
readonly className: string;
|
||||
readonly data: any;
|
||||
readonly errors: any;
|
||||
}
|
||||
|
||||
export class FeathersError extends Error {
|
||||
constructor(msg: string | Error, name: string, code: number, className: string, data: any)
|
||||
readonly code: number;
|
||||
readonly className: string;
|
||||
readonly data: any;
|
||||
readonly errors: any;
|
||||
constructor(msg: string | Error, name: string, code: number, className: string, data: any);
|
||||
toJSON(): FeathersErrorJSON;
|
||||
}
|
||||
|
||||
export class BadRequest extends FeathersError {
|
||||
|
||||
Reference in New Issue
Block a user