gun/types/options.d.ts
Bernie Telles 70eb769209
Add TypeScript test file & tsd as devDep to run it (#1091)
This helps those who want to contribute to the TypeScript definitions
by adding:
 * a tool called `tsd,`
 * its corresponding configuration in package.json
 * a teste file index.test-d.ts

Also add a extra line between type definitions to improve readability.
2021-07-27 13:02:47 -07:00

40 lines
1.2 KiB
TypeScript

/**
* options['module name'] allows you to pass options to a 3rd party module.
* Their project README will likely list the exposed options
* https://github.com/amark/gun/wiki/Modules
*/
export interface IGunConstructorOptions extends Partial<{
/** Undocumented but mentioned. Write data to a JSON. */
file: string;
/** Undocumented but mentioned. Create a websocket server */
web: any;
/** Undocumented but mentioned. Amazon S3 */
s3: {
key: any;
secret: any;
bucket: any;
};
/** the URLs are properties, and the value is an empty object. */
peers: string[] | Record<string, {}>;
/** default: true, creates and persists local (nodejs) data using Radisk. */
radisk: boolean;
/** default: true, persists local (browser) data to localStorage. */
localStorage: boolean;
/** uuid allows you to override the default 24 random alphanumeric soul generator with your own function. */
uuid(): string;
/**
* allows you to pass options to a 3rd party module. Their project README will likely list the exposed options
* @see https://github.com/amark/gun/wiki/Modules
*/
[key: string]: any;
}> {
}