Skip to content

Commit

Permalink
feat(lib) add DTO interface
Browse files Browse the repository at this point in the history
  • Loading branch information
ProGM committed Aug 16, 2022
1 parent 40cdbc0 commit bf7a7a9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 1 deletion.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

All notable changes to this project made by Monade Team are documented in this file. For info refer to [email protected]

## [1.0.2] - 2022-08-16
### Added
- Utility interface `DTO<T>`

## [1.0.1] - 2022-03-31

First release
2 changes: 2 additions & 0 deletions dist/types/interfaces/DTO.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { Model } from "../Model";
export declare type DTO<T> = Partial<Omit<T, keyof Model>>;
1 change: 1 addition & 0 deletions dist/types/interfaces/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from "./JSONData";
export * from "./JSONModel";
export * from "./DTO";
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@monade/json-api-parser",
"version": "1.0.1",
"version": "1.0.2",
"description": "A parser for JSON:API format that maps data to models using decorators, inspired by retrofit.",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
Expand Down
3 changes: 3 additions & 0 deletions src/interfaces/DTO.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Model } from "../Model";

export type DTO<T> = Partial<Omit<T, keyof Model>>;
1 change: 1 addition & 0 deletions src/interfaces/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from "./JSONData";
export * from "./JSONModel";
export * from "./DTO";

0 comments on commit bf7a7a9

Please sign in to comment.