connect-mongo
Version:
MongoDB session store for Express and Connect
33 lines (31 loc) • 1.15 kB
TypeScript
/**
* If you import a dependency which does not include its own type definitions,
* TypeScript will try to find a definition for it by following the `typeRoots`
* compiler option in tsconfig.json. For this project, we've configured it to
* fall back to this folder if nothing is found in node_modules/@types.
*
* Often, you can install the DefinitelyTyped
* (https://github.com/DefinitelyTyped/DefinitelyTyped) type definition for the
* dependency in question. However, if no one has yet contributed definitions
* for the package, you may want to declare your own. (If you're using the
* `noImplicitAny` compiler options, you'll be required to declare it.)
*
* This is an example type definition which allows import from `module-name`,
* e.g.:
* ```ts
* import something from 'module-name';
* something();
* ```
*/
declare module 'kruptein' {
type Callback = (msg?: string, data?: string) => void
class Kruptein {
public set(
secret: string,
plaintext: string | any,
callback: Callback
): void
public get(secret: string, ciphertext: string, callback: Callback): void
}
export = Kruptein
}