1.1.4 • Published 2 years ago
@types/js-gravatar v1.1.4
Installation
npm install --save @types/js-gravatar
Summary
This package contains type definitions for js-gravatar (https://github.com/chukwumaijem/js-gravatar#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/js-gravatar.
index.d.ts
// Type definitions for js-gravatar 1.1
// Project: https://github.com/chukwumaijem/js-gravatar#readme
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* JS Gravatar
* {@link https://github.com/chukwumaijem/js-gravatar#js-gravatar}
*/
declare function jsGravatar(options?: jsGravatar.Options): string;
declare namespace jsGravatar {
interface Options {
/**
* The size of the image to be displayed. Should be from 1 to 2048
*/
size?: number | undefined;
/**
* What image should be used if email does not have a gravatar
*/
defaultImage?: '404' | 'mp' | 'identicon' | 'monsterid' | 'wavatar' | 'retro' | 'robohash' | 'blank' | undefined;
/**
* Email address of the user to generate gravatar for
*/
email: string;
/**
* Optional: MD5 hash of the email above.
* If email is provided, md5hash will be ignored. If neither email nor md5hash is provided, the library will throw en error
*/
md5Hash?: string | undefined;
}
function buildQueryStringFromOptions(options: Options): string;
function validateOptions(options?: Options): void;
}
export as namespace jsGravatar;
export = jsGravatar;
Additional Details
- Last updated: Thu, 08 Jul 2021 16:22:45 GMT
- Dependencies: none
- Global values:
jsGravatar
Credits
These definitions were written by Piotr Błażejewicz.