import * as React from 'react'; type ContextProvider = React.FC; interface UseAssertedContext { (consumerName: string): ContextValueType; } interface UseContext { (consumerName: string): ContextValueType; (consumerName: string, options: { optional: true; }): ContextValueType | undefined; } declare function createContext(rootComponentName: string): readonly [ContextProvider, UseContext]; declare function createContext(rootComponentName: string, defaultContext: ContextValueType): readonly [ContextProvider, UseAssertedContext]; type Scope = { [scopeName: string]: React.Context[]; } | undefined; type ScopeHook = (scope: Scope) => { [__scopeProp: string]: Scope; }; interface CreateScope { scopeName: string; (): ScopeHook; } type ScopedContextProvider = React.FC; children: React.ReactNode; }>; interface UseScopedContext { (consumerName: string, scope: Scope): ContextValueType; (consumerName: string, scope: Scope, options: { optional?: true; }): ContextValueType | undefined; } interface UseAssertedScopedContext { (consumerName: string, scope: Scope): ContextValueType; } interface CreateScopedContext { (rootComponentName: string): readonly [ScopedContextProvider, UseScopedContext]; (rootComponentName: string, defaultContext: ContextValueType): readonly [ScopedContextProvider, UseAssertedScopedContext]; } declare function createContextScope(scopeName: string, createContextScopeDeps?: CreateScope[]): readonly [CreateScopedContext, CreateScope]; export { type CreateScope, type Scope, createContext, createContextScope };