tc-response-model
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Track Cargo Response Model

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

My awesome module

Install

npm install tc-response-model

Usage

import { ApiResponse, ApiSuccessResponse } from 'tc-response-model';

// Sending success response
const apiSuccess: ApiSuccessResponse<string> =
    new ApiSuccessResponse<string>('Hello World', 'Data description');
return ApiResponse.send(apiSuccess, []);

// Sending error response
try {
    // ...your code here
} catch (e) {
    // ...your Error handler here
    // ...
    return ApiResponse.send(e);
}

Package Sidebar

Install

npm i tc-response-model

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

12.6 kB

Total Files

17

Last publish

Collaborators

  • bloodred17