mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Added declarations for 'dookie' (#14082)
* Added declarations for 'dookie' * fix lint
This commit is contained in:
parent
ae4fe7b6de
commit
d775cf9ea3
8
dookie/dookie-tests.ts
Normal file
8
dookie/dookie-tests.ts
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
import {push, pull} from './index';
|
||||
|
||||
(async ()=>{
|
||||
|
||||
await push('mongodb://localhost:27017/test', {test:[{ok:1},{ok:2}]});
|
||||
|
||||
})();
|
||||
19
dookie/index.d.ts
vendored
Normal file
19
dookie/index.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// Type definitions for dookie 0.1
|
||||
// Project: https://github.com/vkarpov15/dookie#readme
|
||||
// Definitions by: Swanest <https://github.com/swanest>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface PushOpts {
|
||||
filename?: string;
|
||||
dropDatabase: boolean;
|
||||
}
|
||||
|
||||
// Our exports:
|
||||
export function push(uri: string, data: any, opts?: PushOpts): Promise<any>;
|
||||
|
||||
export function pull(uri: string): Promise<any>;
|
||||
|
||||
export function pullToStream(uri: string, stream: any): Promise<any>;
|
||||
|
||||
// Make this available as a global for non-module code.
|
||||
export as namespace dookie;
|
||||
20
dookie/tsconfig.json
Normal file
20
dookie/tsconfig.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"dookie-tests.ts"
|
||||
]
|
||||
}
|
||||
1
dookie/tslint.json
Normal file
1
dookie/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Loading…
Reference in New Issue
Block a user