Skip to content

Commit bf7a7a9

Browse files
committed
feat(lib) add DTO interface
1 parent 40cdbc0 commit bf7a7a9

File tree

6 files changed

+19
-1
lines changed

6 files changed

+19
-1
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
All notable changes to this project made by Monade Team are documented in this file. For info refer to [email protected]
4+
5+
## [1.0.2] - 2022-08-16
6+
### Added
7+
- Utility interface `DTO<T>`
8+
9+
## [1.0.1] - 2022-03-31
10+
11+
First release

dist/types/interfaces/DTO.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import { Model } from "../Model";
2+
export declare type DTO<T> = Partial<Omit<T, keyof Model>>;

dist/types/interfaces/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from "./JSONData";
22
export * from "./JSONModel";
3+
export * from "./DTO";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@monade/json-api-parser",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A parser for JSON:API format that maps data to models using decorators, inspired by retrofit.",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.esm.js",

src/interfaces/DTO.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { Model } from "../Model";
2+
3+
export type DTO<T> = Partial<Omit<T, keyof Model>>;

src/interfaces/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from "./JSONData";
22
export * from "./JSONModel";
3+
export * from "./DTO";

0 commit comments

Comments
 (0)