/** * Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose * @author David Sehnal */ import { Model } from '../../../mol-model/structure.js'; import { ModelFormat } from '../../format.js'; import { CustomPropertyDescriptor } from '../../../mol-model/custom-property.js'; declare class FormatRegistry { private map; private applicable; add(kind: ModelFormat['kind'], obtain: (model: Model) => T | undefined, applicable?: (model: Model) => boolean): void; remove(kind: ModelFormat['kind']): void; get(kind: ModelFormat['kind']): ((model: Model) => T | undefined) | undefined; isApplicable(model: Model): boolean; } export { FormatPropertyProvider }; interface FormatPropertyProvider { readonly descriptor: CustomPropertyDescriptor; readonly formatRegistry: FormatRegistry; isApplicable(model: Model): boolean; get(model: Model): T | undefined; set(model: Model, value: T): void; delete(model: Model): void; } declare namespace FormatPropertyProvider { function create(descriptor: CustomPropertyDescriptor, options?: { asDynamic?: boolean; }): FormatPropertyProvider; }