Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
bd7349ab37 | |||
62f3b02812 | |||
8316de8d82 | |||
f2c953f0e8 | |||
5696b3cb19 | |||
3e3b955f04 | |||
d9326300b0 | |||
b9b80d1078 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@apiglobal/typedrequest-interfaces",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.11",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@apiglobal/typedrequest-interfaces",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.11",
|
||||
"private": false,
|
||||
"description": "interfaces for making typed requests",
|
||||
"main": "dist/index.js",
|
||||
|
@ -1,6 +1,12 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as typedrequestInterfaces from '../ts/index';
|
||||
|
||||
interface IRequestSample extends typedrequestInterfaces.implementsTR<typedrequestInterfaces.ITypedRequest, IRequestSample> {
|
||||
method: 'hey';
|
||||
request: {};
|
||||
response: {};
|
||||
}
|
||||
|
||||
tap.test('first test', async () => {
|
||||
typedrequestInterfaces;
|
||||
});
|
||||
|
13
ts/index.ts
13
ts/index.ts
@ -2,4 +2,17 @@ export interface ITypedRequest {
|
||||
method: string;
|
||||
request: object;
|
||||
response: object;
|
||||
error?: { text: string, data: any };
|
||||
retry?: {
|
||||
waitForMs: number;
|
||||
reason: string;
|
||||
};
|
||||
}
|
||||
|
||||
export type implementsTR<T, U extends T> = {};
|
||||
|
||||
export interface IBroadCastEvent<T> {
|
||||
name: string;
|
||||
uniqueEventId: string;
|
||||
payload: T;
|
||||
}
|
||||
|
Reference in New Issue
Block a user