import { LitElement } from '../LitElement.ts'; import { BaseController } from './types.ts'; /** * A magical solution to finding out what property name a given controller * on a given object was assigned to. * * @remarks * This does not work for properties that have \@property() or \@state() * decorator - for those, use trackPropKey() instead. * * @example * function trackMe(defaultValue: T, component: LitElement):T { * trackPropertyKey(component, (key)=>console.log(key), defaultValue); * return defaultValue; * } * * class MyComponent extends LitElement { * // Will console log "myProp" * myProp = trackMe('a', this); * } * */ export declare const trackPropertyKey: (object: BaseController | LitElement, onResolved: (key: string | undefined) => void, defaultValue: T) => T; /** * Resolve all pending trackPropertyKey() calls. This must be called after a * property you are trying to resolve had it's default value set, thus after * constructor. At the start of connectedCallback is a perfect place. */ export declare const propertyTrackResolve: () => void;