mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #8206 from Dashlane/gravatar
Add typings for gravatar
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
/// <reference path="gravatar.d.ts" />
|
||||
|
||||
import gravatar = require('gravatar');
|
||||
|
||||
gravatar.url("email@example.com");
|
||||
gravatar.url("email@example.com", { s: "200", r: "pg", d: "404" });
|
||||
gravatar.url("email@example.com", { size: "200", r: "pg", d: "404" });
|
||||
gravatar.url("email@example.com", { s: "200" });
|
||||
gravatar.url("email@example.com", { default: "404" });
|
||||
gravatar.url("email@example.com", { s: "200", rating: "pg", d: "404" }, true);
|
||||
gravatar.url("email@example.com", { s: "200", r: "pg", default: "404" }, false);
|
||||
gravatar.url("email@example.com", { d: "404" }, false);
|
||||
gravatar.url("email@example.com", { forcedefault: "y" }, false);
|
||||
gravatar.url("email@example.com", { f: "y" });
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
// Type definitions for gravatar v1.4.0
|
||||
// Project: https://github.com/emerleite/node-gravatar
|
||||
// Definitions by: Denis Sokolov <https://github.com/denis-sokolov>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module GravatarModule {
|
||||
type Options = {
|
||||
d?: string
|
||||
default?: string
|
||||
f?: string
|
||||
forcedefault?: string
|
||||
r?: string
|
||||
rating?: string
|
||||
s?: string
|
||||
size?: string
|
||||
}
|
||||
|
||||
function url(email: string, options?: Options, forceProtocol?: boolean): string;
|
||||
}
|
||||
|
||||
declare module "gravatar" {
|
||||
export = GravatarModule;
|
||||
}
|
||||
Reference in New Issue
Block a user