@optolith/entity-descriptions 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.2.1](https://github.com/Optolith/entity-descriptions/compare/v0.2.0...v0.2.1) (2024-10-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* default database accessors type always throws error when function is called ([31bcb85](https://github.com/Optolith/entity-descriptions/commit/31bcb850a7d962417a65c4517090fb9c9d581fef))
|
|
11
|
+
|
|
5
12
|
## [0.2.0](https://github.com/Optolith/entity-descriptions/compare/v0.1.1...v0.2.0) (2024-10-07)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -2,4 +2,4 @@ import { ExperienceLevel } from "optolith-database-schema/types/ExperienceLevel"
|
|
|
2
2
|
/**
|
|
3
3
|
* Get a JSON representation of the rules text for an experience level.
|
|
4
4
|
*/
|
|
5
|
-
export declare const getExperienceLevelEntityDescription: import("../index.js").EntityDescriptionCreator<ExperienceLevel | undefined,
|
|
5
|
+
export declare const getExperienceLevelEntityDescription: import("../index.js").EntityDescriptionCreator<ExperienceLevel | undefined, object, import("../index.js").EntityDescription>;
|
|
@@ -2,4 +2,4 @@ import { OptionalRule } from "optolith-database-schema/types/rule/OptionalRule";
|
|
|
2
2
|
/**
|
|
3
3
|
* Get a JSON representation of the rules text for an optional rule.
|
|
4
4
|
*/
|
|
5
|
-
export declare const getOptionalRuleEntityDescription: import("../index.js").EntityDescriptionCreator<OptionalRule | undefined,
|
|
5
|
+
export declare const getOptionalRuleEntityDescription: import("../index.js").EntityDescriptionCreator<OptionalRule | undefined, object, import("../index.js").EntityDescription>;
|
package/lib/index.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ import { LocaleEnvironment } from "./helpers/locale.js";
|
|
|
5
5
|
* Creates a function that creates the JSON representation of the rules text for
|
|
6
6
|
* a library entry.
|
|
7
7
|
*/
|
|
8
|
-
export declare const createEntityDescriptionCreator: <T, A extends object =
|
|
8
|
+
export declare const createEntityDescriptionCreator: <T, A extends object = object>(fn: EntityDescriptionCreator<T, A, RawEntityDescription>) => EntityDescriptionCreator<T | undefined, A>;
|
|
9
9
|
/**
|
|
10
10
|
* A function that creates the JSON representation of the rules text for a
|
|
11
11
|
* library entry.
|
|
12
12
|
*/
|
|
13
|
-
export type EntityDescriptionCreator<T, A extends object =
|
|
13
|
+
export type EntityDescriptionCreator<T, A extends object = object, R = EntityDescription> = (databaseAccessors: A & {
|
|
14
14
|
getPublicationById: GetById.Static.Publication;
|
|
15
15
|
}, locale: LocaleEnvironment, entry: T) => R | undefined;
|
|
16
16
|
/**
|