mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-03 11:54:31 +08:00
16 lines
406 B
TypeScript
16 lines
406 B
TypeScript
import urlMetadata = require("url-metadata");
|
|
|
|
const opts: urlMetadata.Options = {
|
|
userAgent: "url-metadata-test",
|
|
fromEmail: "testing@url-metadata.com",
|
|
maxRedirects: 3,
|
|
timeout: 10000,
|
|
descriptionLength: 10000,
|
|
ensureSecureImageRequest: true
|
|
};
|
|
const url = "https://google.com";
|
|
|
|
urlMetadata(url, opts).then((result: urlMetadata.Result) => {
|
|
result; // $ExpectType Result
|
|
});
|