feat(services): add general.interface.ts
This commit introduces a new interface file named 'general.interface.ts' to standardise return types in the services scope. It includes the IStandardisedReturn interface and the EReturnState enum. These additions enhance the consistency of return types across different services.
This commit is contained in:
parent
cc286462f0
commit
e6d37ef600
13
src/services/general.interface.ts
Normal file
13
src/services/general.interface.ts
Normal file
@ -0,0 +1,13 @@
|
||||
export interface IStandardisedReturn<T> {
|
||||
state: EReturnState;
|
||||
message?: string;
|
||||
resolved?: T;
|
||||
}
|
||||
|
||||
export enum EReturnState {
|
||||
unauthorized = 0,
|
||||
clientError = 1,
|
||||
serverError = 2,
|
||||
done = 3,
|
||||
queued = 4,
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user