starting db connection and cleaning things out
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// TODO: enforce this or the other sort of thing for the class
|
||||
// type INirvanaResponse<T> =
|
||||
// | {
|
||||
// data: T;
|
||||
// error?: Error;
|
||||
// }
|
||||
// | { data?: T; error: Error };
|
||||
|
||||
export default class NirvanaResponse<T> {
|
||||
data?: T;
|
||||
error?: Error;
|
||||
message?: string;
|
||||
|
||||
constructor(_data: T, _error?: Error, _message?: string) {
|
||||
this.data = _data;
|
||||
this.error = _error;
|
||||
|
||||
this.message = _message;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user