mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Added definitions for crpc
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
import crpc from 'crpc';
|
||||
|
||||
const client = crpc('https://example.com/');
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// Type definitions for crpc 0.2
|
||||
// Project: https://github.com/billinghamj/crpc
|
||||
// Definitions by: Alexander Forbes-Reed <https://github.com/0xdeafcafe>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.9
|
||||
|
||||
export type Client = <TReq, TRes>(path: string, body: TReq, options?: {} | null) => Promise<TRes>;
|
||||
|
||||
export default function crpc(baseUrl: string, options?: {}): Client;
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"crpc-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"no-unnecessary-generics": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user