@tpluscode/rdfine
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.2.5](https://github.com/tpluscode/rdfine/compare/v0.2.4...v0.2.5) (2020-01-20) | ||
### Features | ||
* export indexer interface ([aea91a8](https://github.com/tpluscode/rdfine/commit/aea91a81028d9c43472daaf149dca91d9b0c2531)) | ||
### [0.2.4](https://github.com/tpluscode/rdfine/compare/v0.2.3...v0.2.4) (2020-01-20) | ||
@@ -7,0 +14,0 @@ |
export { namespace } from './lib/decorators/namespace'; | ||
export { ResourceFactory, Constructor } from './lib/ResourceFactory'; | ||
export { ResourceFactory, Constructor, ResourceIndexer } from './lib/ResourceFactory'; | ||
export { default as RdfResourceImpl, RdfResource, ResourceIdentifier } from './lib/RdfResource'; | ||
export { property } from './lib/decorators/property'; | ||
//# sourceMappingURL=index.d.ts.map |
import { Clownface } from 'clownface'; | ||
import { Literal } from 'rdf-js'; | ||
import { RdfResource } from './RdfResource'; | ||
@@ -11,2 +12,5 @@ export declare type AnyFunction<A = any> = (...input: any[]) => A; | ||
} | ||
export interface ResourceIndexer<T extends RdfResource = RdfResource> { | ||
[prop: string]: T | Literal | Array<T | Literal>; | ||
} | ||
export declare type Mixin<T extends AnyFunction> = InstanceType<ReturnType<T>>; | ||
@@ -18,5 +22,5 @@ export declare class ResourceFactory<R extends RdfResource = RdfResource, T extends AnyFunction = any> { | ||
addMixin(mixin: Mixin<T> & ShouldApply): void; | ||
createEntity<S>(term: Clownface, typeAndMixins?: Mixin<any>[] | [Constructor, ...Mixin<any>[]]): R & S; | ||
createEntity<S>(term: Clownface, typeAndMixins?: Mixin<any>[] | [Constructor, ...Mixin<any>[]]): R & S & ResourceIndexer<R>; | ||
} | ||
export {}; | ||
//# sourceMappingURL=ResourceFactory.d.ts.map |
{ | ||
"name": "@tpluscode/rdfine", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "RDF/JS idiomatic, native, enjoyable", | ||
@@ -5,0 +5,0 @@ "main": "dist/node/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
68994
1146