UNPKG

386 BPlain TextView Raw
1import getDefaultModule from './getDefaultModule'
2
3interface SanityClient {
4 fetch(query: string, params: {[key: string]: any}): Promise<any>
5}
6
7// We are lazy-loading the part to work around typescript trying to resolve it
8const client = ((): SanityClient => {
9 const client: SanityClient = getDefaultModule(require('part:@sanity/base/client'))
10 return client
11})()
12
13export {client}