jacktuck / unfurl

Metadata scraper with support for oEmbed, Twitter Cards and Open Graph Protocol for Node.js :zap:
MIT License
474 stars 51 forks source link

export Metadata type #115

Open devth opened 3 months ago

devth commented 3 months ago

It'd be useful if users could import the Metadata type. Looks like it's not currently exported, unless I'm missing something?

0xTemporal commented 2 months ago

+1. As a workaround you can infer the type from the unfurl method using types from Typescript 4.5: export type Metadata = Awaited<ReturnType<typeof unfurl>>

devth commented 2 months ago

Nice, thanks @0xTemporal