- Switched to pnpm - Updated to typescript 4.9.5 - JSX transforms switched to react-jsx - Use swc for typescript transforms - Remove deprecated dependencies - Cleanup unused types - Some ESM fixes - PostCSS config now lives in package.json - Bump support target TODO: - switch to vite or plain esbuild - jest to vitest / uvu - jquery to cash-dom - pure ESM (lodash-es, etc.) - drop prettier & husky (lint-staged is okay) - drop wasm cli & xterm.js - update bootstrap
21 lines
654 B
TypeScript
21 lines
654 B
TypeScript
import type * as net from '../../src/scripts/net'
|
|
|
|
export type { ResponseBody } from '../../src/scripts/net'
|
|
|
|
export const init = {} as typeof net.init
|
|
|
|
export const walkFetch = {} as jest.Mock<
|
|
ReturnType<typeof net.walkFetch>,
|
|
Parameters<typeof net.walkFetch>
|
|
>
|
|
|
|
type FetchFn = <T = any>(url: string, data?: object) => Promise<T>
|
|
|
|
export const get = {} as jest.Mock<any, Parameters<typeof net.get>> & FetchFn
|
|
|
|
export const post = {} as jest.Mock<any, Parameters<typeof net.post>> & FetchFn
|
|
|
|
export const put = {} as jest.Mock<any, Parameters<typeof net.put>> & FetchFn
|
|
|
|
export const del = {} as jest.Mock<any, Parameters<typeof net.del>> & FetchFn
|