Added declarations for 'dookie' (#14082)

* Added declarations for 'dookie'

* fix lint
This commit is contained in:
Cyri-L 2017-01-18 18:58:39 +01:00 committed by Mohamed Hegazy
parent ae4fe7b6de
commit d775cf9ea3
4 changed files with 48 additions and 0 deletions

8
dookie/dookie-tests.ts Normal file
View 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
View 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
View 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
View File

@ -0,0 +1 @@
{ "extends": "../tslint.json" }