/** * A component's native `#private` fields, for the inspector's Private * section. A real `#private` field can't be read from outside its class, but * under the dev server the plugin's private-fields rewrite * (`../../plugins/private-fields.ts`) keys each one by * `Symbol.for('@oddsquad/vite-plugin-lit#private::#')` * instead, so an instance's private fields are own symbol-keyed properties. * Without the rewrite there are none, and nothing is shown. * * A field of a string, number or boolean can be set from the panel, as an * override (see `prop-overrides.ts`) named by the symbol's description: the * short name is not enough, as a base class and a subclass may both declare * `#x`. */ import { type InspectorPrivateField } from '../../../types/inspector.js'; /** A private field the rewrite made: its name and the class that declared it. */ interface PrivateKey { name: string; classKey: string; } /** * The private field `key` stands for, or `undefined` for any other symbol. * The name is what follows the last `#`; the class is between it and the * `:` before it. */ export declare const privateKeyOf: (key: symbol) => PrivateKey | undefined; type Primitive = string | number | boolean; /** The element's `#private` fields, serialized for the details pane. */ export declare const collectPrivateFields: (el: Element) => InspectorPrivateField[]; /** * Answer a `set-prop` command for the private field `key` (a symbol * description, see {@link InspectorPrivateField.key}): override it with * `value`, then ask the element to update, as Lit does not watch private * fields. Only a field the element already holds as its own, whose value is * a primitive of the same type, is written: a command can neither add a * field nor change one's type. Returns whether it was applied. */ export declare const setPrivateField: (el: Element, key: string, value: Primitive) => boolean; /** * The live value of the private field shown as `name`, or `undefined` when * there is none. */ export declare const privateValue: (el: Element, name: string) => { value: unknown; } | undefined; export {}; //# sourceMappingURL=private-fields.d.ts.map