UNPKG

@graphiql/react

Version:

[Changelog](https://github.com/graphql/graphiql/blob/main/packages/graphiql-react/CHANGELOG.md) | [API Docs](https://graphiql-test.netlify.app/typedoc/modules/graphiql_react.html) | [NPM](https://www.npmjs.com/package/@graphiql/react)

22 lines (21 loc) 712 B
import { MonacoGraphQLAPI } from 'monaco-graphql'; interface MonacoStoreType { monaco?: typeof import('monaco-editor'); monacoGraphQL?: MonacoGraphQLAPI; actions: { initialize: () => Promise<void>; }; } /** * Dynamically load `monaco-editor` and `monaco-graphql` in `useEffect` after component renders. * * **Do not convert these to static `import` statements.** * In SSR (e.g., Next.js), static imports run on the server * where `window` is undefined and trigger an error. */ export declare const monacoStore: import('zustand').StoreApi<MonacoStoreType>; export declare const useMonaco: { (): MonacoStoreType; <T>(selector: (state: MonacoStoreType) => T): T; }; export {};