diff --git a/src/fetcher.ts b/src/fetcher.ts index 7c87144..cad2694 100644 --- a/src/fetcher.ts +++ b/src/fetcher.ts @@ -1,6 +1,6 @@ -import type { Options, NoUndefined } from './types' +import type { Options } from './types' -export const fetcher: NoUndefined = url => { +export const fetcher: Required['fetcher'] = url => { return new Promise(async resolve => { try { const response = await fetch(url) diff --git a/src/types.ts b/src/types.ts index 1a28bcc..1e58b7a 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,3 @@ -export type NoUndefined = T extends undefined ? never : T export type Thenable = Promise | T export type Hook = (value: string) => Thenable export type BuildSvgDataURI = (html: Node, options: Options) => Promise