mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
19 lines
450 B
TypeScript
19 lines
450 B
TypeScript
import og = require('open-graph');
|
|
|
|
const url = 'http://github.com/samholmes/node-open-graph/raw/master/test.html';
|
|
|
|
og(url, (err, meta) => {
|
|
if (meta) {
|
|
meta.custom;
|
|
meta.description; // $ExpectType string | string[] | undefined
|
|
}
|
|
});
|
|
|
|
og.parse('content', {
|
|
strict: true,
|
|
});
|
|
|
|
og.getHTML('http://github.com/samholmes/node-open-graph/raw/master/test.html', (err, data) => {
|
|
data; // $ExpectType string | undefined
|
|
});
|