ts-retrofit
Advanced tools
Comparing version 1.2.2 to 1.2.3
{ | ||
"name": "ts-retrofit", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "A axios based retrofit implementation for TypeScript.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/nullcc/ts-retrofit", |
@@ -31,3 +31,3 @@ import { | ||
export interface IPost { | ||
export interface Post { | ||
title: string; | ||
@@ -96,7 +96,7 @@ content: string; | ||
@FormUrlEncoded | ||
async createPost2(@FieldMap post: IPost): Promise<Response> { return <Response> {} }; | ||
async createPost2(@FieldMap post: Post): Promise<Response> { return <Response> {} }; | ||
@POST("/posts") | ||
@FormUrlEncoded | ||
async createPost3(@HeaderMap headers: any, @FieldMap post: IPost): Promise<Response> { return <Response> {} }; | ||
async createPost3(@HeaderMap headers: any, @FieldMap post: Post): Promise<Response> { return <Response> {} }; | ||
} | ||
@@ -103,0 +103,0 @@ |
@@ -7,3 +7,3 @@ import * as http from "http"; | ||
TEST_SERVER_ENDPOINT, API_PREFIX, TOKEN, UserService, SearchService, | ||
PostService, AuthService, FileService, User, SearchQuery, Auth, IPost, | ||
PostService, AuthService, FileService, User, SearchQuery, Auth, Post, | ||
TEST_SERVER_PORT, | ||
@@ -157,3 +157,3 @@ } from "./fixtures"; | ||
.build(PostService); | ||
const post: IPost = { title: "hello", content: "world" }; | ||
const post: Post = { title: "hello", content: "world" }; | ||
const response = await postService.createPost3({ 'X-Foo': 'foo', 'X-Bar': 'bar'}, post); | ||
@@ -160,0 +160,0 @@ expect(response.config.headers["X-Foo"]).toEqual('foo'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101574