DefinitelyTyped/types/parse-mockdb/index.d.ts
David Poetzsch-Heffter 9c744806d9 reopen: parse: generic queries & relations (#16809)
* Revert "reverting some changes for now because they cause incompatibilities with existing code bases"

This reverts commit 2c28064515.

* improvements

* fixed version header to be compatible with DefinitelyTyped's release tooling

* using defaults for generics to make this backwards compatible to older typings
and more convenient to use in case no subclassing of Parse.Object is applied

* updated parse-mockdb to make it compatible with new parse typings
2017-06-05 16:46:32 -07:00

23 lines
749 B
TypeScript

// Type definitions for parse-mockdb v0.1.14
// Project: https://github.com/HustleInc/parse-mockdb
// Definitions by: David Poetzsch-Heffter <https://github.com/dpoetzsch>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="parse" />
declare namespace ParseMockDB {
function mockDB(): void;
function unMockDB(): void;
function cleanUp(): void;
function promiseResultSync<T>(promise: Parse.IPromise<T>): T;
type HookType = "beforeSave" | "beforeDelete";
function registerHook(className: string, hookType: HookType, hookFn: (request: Parse.Cloud.BeforeSaveRequest) => Parse.IPromise<any>): void;
}
declare module "parse-mockdb" {
export = ParseMockDB;
}