@mana-app/types 0.0.13 → 0.0.14

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.
@@ -113,3 +113,15 @@ export type LinkItem = AdditionalInfoItemBase<AdditionalInfoType.Links> & {
113
113
  };
114
114
  export type TagItem = AdditionalInfoItemBase<AdditionalInfoType.Tags> & Tag;
115
115
  export type AdditionalInfoSectionItem = StaffItem | CharacterItem | SimpleHighlight | LinkItem | TagItem;
116
+ export type WithoutType<T extends {
117
+ readonly type: any;
118
+ }> = Omit<T, "type">;
119
+ export declare function staffItem(input: WithoutType<StaffItem>): StaffItem;
120
+ export declare function characterItem(input: WithoutType<CharacterItem>): CharacterItem;
121
+ export declare function linkItem(input: WithoutType<LinkItem>): LinkItem;
122
+ export declare function tagItem(input: WithoutType<TagItem>): TagItem;
123
+ export declare function staffSection(input: WithoutType<StaffSection>): StaffSection;
124
+ export declare function highlightsSection(input: WithoutType<HighlightsSection>): HighlightsSection;
125
+ export declare function charactersSection(input: WithoutType<CharactersSection>): CharactersSection;
126
+ export declare function linksSection(input: WithoutType<LinksSection>): LinksSection;
127
+ export declare function tagsSection(input: WithoutType<TagsSection>): TagsSection;
@@ -1,6 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdditionalInfoType = void 0;
4
+ exports.staffItem = staffItem;
5
+ exports.characterItem = characterItem;
6
+ exports.linkItem = linkItem;
7
+ exports.tagItem = tagItem;
8
+ exports.staffSection = staffSection;
9
+ exports.highlightsSection = highlightsSection;
10
+ exports.charactersSection = charactersSection;
11
+ exports.linksSection = linksSection;
12
+ exports.tagsSection = tagsSection;
4
13
  var AdditionalInfoType;
5
14
  (function (AdditionalInfoType) {
6
15
  AdditionalInfoType[AdditionalInfoType["Staff"] = 1] = "Staff";
@@ -10,3 +19,30 @@ var AdditionalInfoType;
10
19
  AdditionalInfoType[AdditionalInfoType["Tags"] = 5] = "Tags";
11
20
  })(AdditionalInfoType || (exports.AdditionalInfoType = AdditionalInfoType = {}));
12
21
  ;
22
+ function staffItem(input) {
23
+ return Object.assign({ type: AdditionalInfoType.Staff }, input);
24
+ }
25
+ function characterItem(input) {
26
+ return Object.assign({ type: AdditionalInfoType.Characters }, input);
27
+ }
28
+ function linkItem(input) {
29
+ return Object.assign({ type: AdditionalInfoType.Links }, input);
30
+ }
31
+ function tagItem(input) {
32
+ return Object.assign({ type: AdditionalInfoType.Tags }, input);
33
+ }
34
+ function staffSection(input) {
35
+ return Object.assign({ type: AdditionalInfoType.Staff }, input);
36
+ }
37
+ function highlightsSection(input) {
38
+ return Object.assign({ type: AdditionalInfoType.Highlights }, input);
39
+ }
40
+ function charactersSection(input) {
41
+ return Object.assign({ type: AdditionalInfoType.Characters }, input);
42
+ }
43
+ function linksSection(input) {
44
+ return Object.assign({ type: AdditionalInfoType.Links }, input);
45
+ }
46
+ function tagsSection(input) {
47
+ return Object.assign({ type: AdditionalInfoType.Tags }, input);
48
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mana-app/types",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {