Skip to content

Commit 3e4f6f6

Browse files
committed
export SuccessResult and ErrorResult types
1 parent cbaf915 commit 3e4f6f6

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

dist/index.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ import type { OpenGraphScraperOptions, OgObject } from './lib/types';
1010
* @returns {Promise} Promise Object with the Open Graph results
1111
*/
1212
export default function run(options: OpenGraphScraperOptions): Promise<ErrorResult | SuccessResult>;
13-
type SuccessResult = {
13+
export type SuccessResult = {
1414
error: false;
1515
html: string;
1616
result: OgObject;
1717
};
18-
type ErrorResult = {
18+
export type ErrorResult = {
1919
error: true;
2020
html: undefined;
2121
result: OgObject;
2222
};
23-
export {};

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ export default async function run(options: OpenGraphScraperOptions): Promise<Err
4343

4444
module.exports = run;
4545

46-
type SuccessResult = {
46+
export type SuccessResult = {
4747
error: false;
4848
html: string;
4949
result: OgObject;
5050
};
5151

52-
type ErrorResult = {
52+
export type ErrorResult = {
5353
error: true;
5454
html: undefined;
5555
result: OgObject;

0 commit comments

Comments
 (0)