Added first source and embed

This commit is contained in:
mrjvs
2023-08-27 20:36:38 +02:00
parent c55f830c30
commit ffe5e4bb4f
17 changed files with 451 additions and 598 deletions

View File

@@ -1,3 +1,5 @@
import * as FormData from 'form-data';
export type FetcherOptions = {
baseUrl?: string;
headers?: Record<string, string>;
@@ -15,10 +17,10 @@ export type DefaultedFetcherOptions = {
};
export type Fetcher<T = any> = {
(url: string, ops: DefaultedFetcherOptions): T;
(url: string, ops: DefaultedFetcherOptions): Promise<T>;
};
// this feature has some quality of life features
export type UseableFetcher<T = any> = {
(url: string, ops?: FetcherOptions): T;
(url: string, ops?: FetcherOptions): Promise<T>;
};