Skip to content

Commit

Permalink
[base] Use typescript for client export
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Oct 6, 2020
1 parent 89f573b commit eafe1c8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/@sanity/base/src/@types/parts.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
/* eslint-disable import/no-duplicates */
// @todo: define interface
declare module 'part:@sanity/base/authentication-fetcher'

declare module 'config:sanity' {
interface SanityConfig {
api: {
projectId: string
dataset: string
}
}

const config: SanityConfig
export default config
}

declare module 'part:@sanity/base/configure-client?' {
import {SanityClient} from '@sanity/client'

type Configurer = (client: SanityClient) => SanityClient
const configure: Configurer | undefined

export default configure
}

declare module 'part:@sanity/base/client' {
import {SanityClient} from '@sanity/client'

Expand Down
File renamed without changes.

0 comments on commit eafe1c8

Please sign in to comment.