/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { TreeStoredSchema } from "../../core";
/**
 * @returns true iff `schema` trees should default to being viewed as just their value when possible.
 *
 * @remarks
 * This may return true for some types which EditableTree does not unwrap to just their value,
 * since EditableTree avoids ever unwrapping primitives that are objects
 * so users checking for primitives by type won't be broken.
 * Checking for this object case is done elsewhere.
 * @alpha
 */
export declare function isPrimitive(schema: TreeStoredSchema): boolean;
/**
 * Variant of ProxyHandler covering when the type of the target and implemented interface are different.
 * Only the parts needed so far are included.
 */
export interface AdaptingProxyHandler<T extends object, TImplements extends object> {
    deleteProperty?(target: T, p: string | symbol): boolean;
    get?(target: T, p: string | symbol, receiver: unknown): unknown;
    getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined;
    has?(target: T, p: string | symbol): boolean;
    ownKeys?(target: T): ArrayLike<keyof TImplements>;
    set?(target: T, p: string | symbol, value: unknown, receiver: unknown): boolean;
}
export declare function adaptWithProxy<From extends object, To extends object>(target: From, proxyHandler: AdaptingProxyHandler<From, To>): To;
export declare function getOwnArrayKeys(length: number): string[];
export declare function keyIsValidIndex(key: string | number, length: number): boolean;
//# sourceMappingURL=utilities.d.ts.map