UNPKG

@tpluscode/rdfine

Version:
15 lines (14 loc) 916 B
import type { NamedNode } from '@rdfjs/types'; import type { GraphPointer } from 'clownface'; import type { RdfResourceCore, ResourceIdentifier } from '../../../RdfResource.js'; import type { Constructor, Mixin } from '../../ResourceFactory.js'; import { ObjectOrFactory } from './decoratorFactory.js'; import type { AccessorOptions } from './index.js'; type InitialValue = GraphPointer<ResourceIdentifier> | RdfResourceCore; interface ResourceOptions<R extends RdfResourceCore> { as?: Mixin[] | [Constructor, ...Mixin[]]; implicitTypes?: NamedNode[]; initial?: ObjectOrFactory<R, InitialValue | RdfResourceCore, ResourceIdentifier>; } declare function resourcePropertyDecorator<R extends RdfResourceCore>(options?: AccessorOptions & ResourceOptions<R>): (protoOrDescriptor: RdfResourceCore<any> | import("../index.js").ClassElement, name?: PropertyKey) => any; export default resourcePropertyDecorator;