@gracefullight/saju 0.4.2 → 0.6.0

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.
Files changed (39) hide show
  1. package/dist/__tests__/relations.test.js +6 -6
  2. package/dist/__tests__/saju.test.js +3 -3
  3. package/dist/__tests__/sinsals.test.js +5 -5
  4. package/dist/__tests__/solar-terms.test.js +26 -16
  5. package/dist/__tests__/strength.test.js +2 -2
  6. package/dist/__tests__/ten-gods.test.js +52 -38
  7. package/dist/__tests__/twelve-stages.test.js +55 -51
  8. package/dist/__tests__/yongshen.test.js +3 -3
  9. package/dist/core/luck.d.ts.map +1 -1
  10. package/dist/core/luck.js +2 -1
  11. package/dist/core/relations.d.ts +35 -20
  12. package/dist/core/relations.d.ts.map +1 -1
  13. package/dist/core/relations.js +105 -33
  14. package/dist/core/sinsals.d.ts +12 -6
  15. package/dist/core/sinsals.d.ts.map +1 -1
  16. package/dist/core/sinsals.js +19 -8
  17. package/dist/core/solar-terms.d.ts +19 -105
  18. package/dist/core/solar-terms.d.ts.map +1 -1
  19. package/dist/core/solar-terms.js +56 -29
  20. package/dist/core/strength.d.ts +7 -3
  21. package/dist/core/strength.d.ts.map +1 -1
  22. package/dist/core/strength.js +52 -28
  23. package/dist/core/ten-gods.d.ts +27 -64
  24. package/dist/core/ten-gods.d.ts.map +1 -1
  25. package/dist/core/ten-gods.js +65 -119
  26. package/dist/core/twelve-stages.d.ts +12 -12
  27. package/dist/core/twelve-stages.d.ts.map +1 -1
  28. package/dist/core/twelve-stages.js +28 -24
  29. package/dist/core/yongshen.d.ts +15 -6
  30. package/dist/core/yongshen.d.ts.map +1 -1
  31. package/dist/core/yongshen.js +67 -38
  32. package/dist/index.d.ts +7 -7
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +6 -6
  35. package/dist/types/common.d.ts +8 -0
  36. package/dist/types/common.d.ts.map +1 -1
  37. package/dist/types/index.d.ts +1 -1
  38. package/dist/types/index.d.ts.map +1 -1
  39. package/package.json +1 -1
@@ -1,33 +1,60 @@
1
- /**
2
- * 24 Solar Terms (二十四節氣)
3
- * Each term corresponds to a specific solar longitude
4
- */
5
- export const SOLAR_TERMS = [
6
- { name: "소한", hanja: "小寒", longitude: 285 },
7
- { name: "대한", hanja: "大寒", longitude: 300 },
8
- { name: "입춘", hanja: "立春", longitude: 315 },
9
- { name: "우수", hanja: "雨水", longitude: 330 },
10
- { name: "경칩", hanja: "驚蟄", longitude: 345 },
11
- { name: "춘분", hanja: "春分", longitude: 0 },
12
- { name: "청명", hanja: "淸明", longitude: 15 },
13
- { name: "곡우", hanja: "穀雨", longitude: 30 },
14
- { name: "입하", hanja: "立夏", longitude: 45 },
15
- { name: "소만", hanja: "小滿", longitude: 60 },
16
- { name: "망종", hanja: "芒種", longitude: 75 },
17
- { name: "하지", hanja: "夏至", longitude: 90 },
18
- { name: "소서", hanja: "小暑", longitude: 105 },
19
- { name: "대서", hanja: "大暑", longitude: 120 },
20
- { name: "입추", hanja: "立秋", longitude: 135 },
21
- { name: "처서", hanja: "處暑", longitude: 150 },
22
- { name: "백로", hanja: "白露", longitude: 165 },
23
- { name: "추분", hanja: "秋分", longitude: 180 },
24
- { name: "한로", hanja: "寒露", longitude: 195 },
25
- { name: "상강", hanja: "霜降", longitude: 210 },
26
- { name: "입동", hanja: "立冬", longitude: 225 },
27
- { name: "소설", hanja: "小雪", longitude: 240 },
28
- { name: "대설", hanja: "大雪", longitude: 255 },
29
- { name: "동지", hanja: "冬至", longitude: 270 },
1
+ export const SOLAR_TERM_KEYS = [
2
+ "minorCold",
3
+ "majorCold",
4
+ "springBegins",
5
+ "rainWater",
6
+ "awakeningInsects",
7
+ "vernalEquinox",
8
+ "pureBrightness",
9
+ "grainRain",
10
+ "summerBegins",
11
+ "grainBuds",
12
+ "grainInEar",
13
+ "summerSolstice",
14
+ "minorHeat",
15
+ "majorHeat",
16
+ "autumnBegins",
17
+ "heatStops",
18
+ "whiteDew",
19
+ "autumnalEquinox",
20
+ "coldDew",
21
+ "frostDescends",
22
+ "winterBegins",
23
+ "minorSnow",
24
+ "majorSnow",
25
+ "winterSolstice",
30
26
  ];
27
+ const SOLAR_TERM_DATA = {
28
+ minorCold: { korean: "소한", hanja: "小寒", longitude: 285 },
29
+ majorCold: { korean: "대한", hanja: "大寒", longitude: 300 },
30
+ springBegins: { korean: "입춘", hanja: "立春", longitude: 315 },
31
+ rainWater: { korean: "우수", hanja: "雨水", longitude: 330 },
32
+ awakeningInsects: { korean: "경칩", hanja: "驚蟄", longitude: 345 },
33
+ vernalEquinox: { korean: "춘분", hanja: "春分", longitude: 0 },
34
+ pureBrightness: { korean: "청명", hanja: "淸明", longitude: 15 },
35
+ grainRain: { korean: "곡우", hanja: "穀雨", longitude: 30 },
36
+ summerBegins: { korean: "입하", hanja: "立夏", longitude: 45 },
37
+ grainBuds: { korean: "소만", hanja: "小滿", longitude: 60 },
38
+ grainInEar: { korean: "망종", hanja: "芒種", longitude: 75 },
39
+ summerSolstice: { korean: "하지", hanja: "夏至", longitude: 90 },
40
+ minorHeat: { korean: "소서", hanja: "小暑", longitude: 105 },
41
+ majorHeat: { korean: "대서", hanja: "大暑", longitude: 120 },
42
+ autumnBegins: { korean: "입추", hanja: "立秋", longitude: 135 },
43
+ heatStops: { korean: "처서", hanja: "處暑", longitude: 150 },
44
+ whiteDew: { korean: "백로", hanja: "白露", longitude: 165 },
45
+ autumnalEquinox: { korean: "추분", hanja: "秋分", longitude: 180 },
46
+ coldDew: { korean: "한로", hanja: "寒露", longitude: 195 },
47
+ frostDescends: { korean: "상강", hanja: "霜降", longitude: 210 },
48
+ winterBegins: { korean: "입동", hanja: "立冬", longitude: 225 },
49
+ minorSnow: { korean: "소설", hanja: "小雪", longitude: 240 },
50
+ majorSnow: { korean: "대설", hanja: "大雪", longitude: 255 },
51
+ winterSolstice: { korean: "동지", hanja: "冬至", longitude: 270 },
52
+ };
53
+ export function getSolarTermLabel(key) {
54
+ const data = SOLAR_TERM_DATA[key];
55
+ return { key, ...data };
56
+ }
57
+ export const SOLAR_TERMS = SOLAR_TERM_KEYS.map((key) => getSolarTermLabel(key));
31
58
  function normDeg(x) {
32
59
  x %= 360;
33
60
  return x < 0 ? x + 360 : x;
@@ -1,5 +1,9 @@
1
- export type StrengthLevel = "극약" | "태약" | "신약" | "중화신약" | "중화" | "중화신강" | "신강" | "태강" | "극왕";
2
- export declare const STRENGTH_LEVELS: StrengthLevel[];
1
+ import type { Label } from "../types";
2
+ export declare const STRENGTH_LEVEL_KEYS: readonly ["extremelyWeak", "veryWeak", "weak", "neutralWeak", "neutral", "neutralStrong", "strong", "veryStrong", "extremelyStrong"];
3
+ export type StrengthLevelKey = (typeof STRENGTH_LEVEL_KEYS)[number];
4
+ export interface StrengthLevelLabel extends Label<StrengthLevelKey> {
5
+ }
6
+ export declare function getStrengthLevelLabel(key: StrengthLevelKey): StrengthLevelLabel;
3
7
  export interface StrengthFactors {
4
8
  deukryeong: number;
5
9
  deukji: number;
@@ -9,7 +13,7 @@ export interface StrengthFactors {
9
13
  weakenCount: number;
10
14
  }
11
15
  export interface StrengthResult {
12
- level: StrengthLevel;
16
+ level: StrengthLevelLabel;
13
17
  score: number;
14
18
  factors: StrengthFactors;
15
19
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"strength.d.ts","sourceRoot":"","sources":["../../src/core/strength.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GACrB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,IAAI,GACJ,MAAM,GACN,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC;AAET,eAAO,MAAM,eAAe,EAAE,aAAa,EAU1C,CAAC;AAsKF,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,eAAe,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACjB,cAAc,CAsGhB"}
1
+ {"version":3,"file":"strength.d.ts","sourceRoot":"","sources":["../../src/core/strength.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AASrC,eAAO,MAAM,mBAAmB,sIAUtB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,gBAAgB,CAAC;CAAG;AActE,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,GAAG,kBAAkB,CAG/E;AAgLD,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,eAAe,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACjB,cAAc,CAsGhB"}
@@ -1,15 +1,30 @@
1
- import { getStemElement, getStemPolarity, getTenGod } from "./ten-gods";
2
- export const STRENGTH_LEVELS = [
3
- "극약",
4
- "태약",
5
- "신약",
6
- "중화신약",
7
- "중화",
8
- "중화신강",
9
- "신강",
10
- "태강",
11
- "극왕",
1
+ import { getStemElement, getStemPolarity, getTenGodKey, } from "./ten-gods";
2
+ export const STRENGTH_LEVEL_KEYS = [
3
+ "extremelyWeak",
4
+ "veryWeak",
5
+ "weak",
6
+ "neutralWeak",
7
+ "neutral",
8
+ "neutralStrong",
9
+ "strong",
10
+ "veryStrong",
11
+ "extremelyStrong",
12
12
  ];
13
+ const STRENGTH_LEVEL_DATA = {
14
+ extremelyWeak: { korean: "극약", hanja: "極弱" },
15
+ veryWeak: { korean: "태약", hanja: "太弱" },
16
+ weak: { korean: "신약", hanja: "身弱" },
17
+ neutralWeak: { korean: "중화신약", hanja: "中和身弱" },
18
+ neutral: { korean: "중화", hanja: "中和" },
19
+ neutralStrong: { korean: "중화신강", hanja: "中和身強" },
20
+ strong: { korean: "신강", hanja: "身強" },
21
+ veryStrong: { korean: "태강", hanja: "太強" },
22
+ extremelyStrong: { korean: "극왕", hanja: "極旺" },
23
+ };
24
+ export function getStrengthLevelLabel(key) {
25
+ const data = STRENGTH_LEVEL_DATA[key];
26
+ return { key, ...data };
27
+ }
13
28
  const HIDDEN_STEM_WEIGHTS = {
14
29
  子: [{ stem: "癸", weight: 1.0, type: "본기" }],
15
30
  丑: [
@@ -147,11 +162,20 @@ function calculateRootStrength(dayMaster, branch) {
147
162
  function isTransparent(stem, allStems) {
148
163
  return allStems.includes(stem);
149
164
  }
165
+ const HELPFUL_TEN_GODS = ["companion", "robWealth", "directSeal", "indirectSeal"];
166
+ const WEAKENING_TEN_GODS = [
167
+ "eatingGod",
168
+ "hurtingOfficer",
169
+ "indirectWealth",
170
+ "directWealth",
171
+ "sevenKillings",
172
+ "directOfficer",
173
+ ];
150
174
  function isHelpfulTenGod(tenGod) {
151
- return ["비견", "겁재", "정인", "편인"].includes(tenGod);
175
+ return HELPFUL_TEN_GODS.includes(tenGod);
152
176
  }
153
177
  function isWeakeningTenGod(tenGod) {
154
- return ["식신", "상관", "편재", "정재", "편관", "정관"].includes(tenGod);
178
+ return WEAKENING_TEN_GODS.includes(tenGod);
155
179
  }
156
180
  export function analyzeStrength(yearPillar, monthPillar, dayPillar, hourPillar) {
157
181
  const dayMaster = dayPillar[0];
@@ -168,7 +192,7 @@ export function analyzeStrength(yearPillar, monthPillar, dayPillar, hourPillar)
168
192
  let transparentBonus = 0;
169
193
  for (const hs of monthHiddenStems) {
170
194
  if (isTransparent(hs.stem, allStems)) {
171
- const tenGod = getTenGod(dayMaster, hs.stem);
195
+ const tenGod = getTenGodKey(dayMaster, hs.stem);
172
196
  if (isHelpfulTenGod(tenGod)) {
173
197
  transparentBonus += hs.weight * 0.3;
174
198
  }
@@ -182,7 +206,7 @@ export function analyzeStrength(yearPillar, monthPillar, dayPillar, hourPillar)
182
206
  let deukse = 0;
183
207
  const otherStems = [yearPillar[0], monthPillar[0], hourPillar[0]];
184
208
  for (const stem of otherStems) {
185
- const tenGod = getTenGod(dayMaster, stem);
209
+ const tenGod = getTenGodKey(dayMaster, stem);
186
210
  if (isHelpfulTenGod(tenGod)) {
187
211
  deukse += 1;
188
212
  }
@@ -190,7 +214,7 @@ export function analyzeStrength(yearPillar, monthPillar, dayPillar, hourPillar)
190
214
  let helpCount = 0;
191
215
  let weakenCount = 0;
192
216
  for (const stem of otherStems) {
193
- const tenGod = getTenGod(dayMaster, stem);
217
+ const tenGod = getTenGodKey(dayMaster, stem);
194
218
  if (isHelpfulTenGod(tenGod))
195
219
  helpCount++;
196
220
  if (isWeakeningTenGod(tenGod))
@@ -200,7 +224,7 @@ export function analyzeStrength(yearPillar, monthPillar, dayPillar, hourPillar)
200
224
  const hiddenStems = HIDDEN_STEM_WEIGHTS[branch] || [];
201
225
  const mainStem = hiddenStems[0]?.stem;
202
226
  if (mainStem) {
203
- const tenGod = getTenGod(dayMaster, mainStem);
227
+ const tenGod = getTenGodKey(dayMaster, mainStem);
204
228
  if (isHelpfulTenGod(tenGod))
205
229
  helpCount++;
206
230
  if (isWeakeningTenGod(tenGod))
@@ -215,25 +239,25 @@ export function analyzeStrength(yearPillar, monthPillar, dayPillar, hourPillar)
215
239
  score += helpCount * 5;
216
240
  score -= weakenCount * 6;
217
241
  score = Math.round(score * 10) / 10;
218
- let level;
242
+ let levelKey;
219
243
  if (score <= 10)
220
- level = "극약";
244
+ levelKey = "extremelyWeak";
221
245
  else if (score <= 20)
222
- level = "태약";
246
+ levelKey = "veryWeak";
223
247
  else if (score <= 30)
224
- level = "신약";
248
+ levelKey = "weak";
225
249
  else if (score <= 38)
226
- level = "중화신약";
250
+ levelKey = "neutralWeak";
227
251
  else if (score <= 45)
228
- level = "중화";
252
+ levelKey = "neutral";
229
253
  else if (score <= 55)
230
- level = "중화신강";
254
+ levelKey = "neutralStrong";
231
255
  else if (score <= 70)
232
- level = "신강";
256
+ levelKey = "strong";
233
257
  else if (score <= 85)
234
- level = "태강";
258
+ levelKey = "veryStrong";
235
259
  else
236
- level = "극왕";
260
+ levelKey = "extremelyStrong";
237
261
  const factors = {
238
262
  deukryeong: Math.round(deukryeong * 100) / 100,
239
263
  deukji: Math.round(deukji * 100) / 100,
@@ -247,7 +271,7 @@ export function analyzeStrength(yearPillar, monthPillar, dayPillar, hourPillar)
247
271
  description += tonggeun > 0 ? `, 통근(${Math.round(tonggeun * 100) / 100})` : "";
248
272
  description += deukse > 0 ? `, 득세(${deukse})` : "";
249
273
  return {
250
- level,
274
+ level: getStrengthLevelLabel(levelKey),
251
275
  score,
252
276
  factors,
253
277
  description,
@@ -1,127 +1,90 @@
1
- import type { Element, Polarity } from "../types";
1
+ import type { Element, Label, Polarity } from "../types";
2
2
  import { ELEMENTS } from "../utils";
3
3
  export type { Element, Polarity };
4
4
  export { ELEMENTS };
5
- export type TenGod = "비견" | "겁재" | "식신" | "상관" | "편재" | "정재" | "편관" | "정관" | "편인" | "정인";
6
- export declare const TEN_GODS: TenGod[];
7
- export declare const TEN_GOD_HANJA: Record<TenGod, string>;
8
- export declare const TEN_GOD_ENGLISH: Record<TenGod, string>;
5
+ export interface ElementLabel extends Label<Element> {
6
+ }
7
+ export declare function getElementLabel(key: Element): ElementLabel;
8
+ export declare const TEN_GOD_KEYS: readonly ["companion", "robWealth", "eatingGod", "hurtingOfficer", "indirectWealth", "directWealth", "sevenKillings", "directOfficer", "indirectSeal", "directSeal"];
9
+ export type TenGodKey = (typeof TEN_GOD_KEYS)[number];
10
+ export interface TenGodLabel extends Label<TenGodKey> {
11
+ }
12
+ export declare function getTenGodLabel(key: TenGodKey): TenGodLabel;
9
13
  export declare const HIDDEN_STEMS: Record<string, string[]>;
10
- /**
11
- * 천간의 오행을 반환
12
- */
13
14
  export declare function getStemElement(stem: string): Element;
14
- /**
15
- * 천간의 음양을 반환
16
- */
17
15
  export declare function getStemPolarity(stem: string): Polarity;
18
- /**
19
- * 지지의 오행을 반환
20
- */
21
16
  export declare function getBranchElement(branch: string): Element;
22
- /**
23
- * 지지의 음양을 반환
24
- */
25
17
  export declare function getBranchPolarity(branch: string): Polarity;
26
- /**
27
- * 지지의 장간(숨은 천간들)을 반환
28
- */
29
18
  export declare function getHiddenStems(branch: string): string[];
30
- /**
31
- * 일간(Day Master)과 다른 천간의 관계에서 십신을 판정
32
- * @param dayMaster 일간 (예: "甲")
33
- * @param targetStem 비교 대상 천간
34
- * @returns 십신
35
- */
36
- export declare function getTenGod(dayMaster: string, targetStem: string): TenGod;
37
- /**
38
- * 지지에 대한 십신 판정 (본기 기준)
39
- */
40
- export declare function getTenGodForBranch(dayMaster: string, branch: string): TenGod;
41
- /**
42
- * 지지의 모든 장간에 대한 십신 분석
43
- */
19
+ export declare function getTenGodKey(dayMaster: string, targetStem: string): TenGodKey;
20
+ export declare function getTenGodForBranch(dayMaster: string, branch: string): TenGodLabel;
44
21
  export declare function getTenGodsForBranch(dayMaster: string, branch: string): {
45
22
  stem: string;
46
- tenGod: TenGod;
23
+ tenGod: TenGodLabel;
47
24
  type: "본기" | "중기" | "여기";
48
25
  }[];
49
- /**
50
- * 사주 전체의 십신 분석
51
- */
26
+ export interface DayMasterLabel extends Label<"dayMaster"> {
27
+ }
52
28
  export interface FourPillarsTenGods {
53
29
  year: {
54
30
  stem: {
55
31
  char: string;
56
- tenGod: TenGod;
32
+ tenGod: TenGodLabel;
57
33
  };
58
34
  branch: {
59
35
  char: string;
60
- tenGod: TenGod;
36
+ tenGod: TenGodLabel;
61
37
  hiddenStems: {
62
38
  stem: string;
63
- tenGod: TenGod;
39
+ tenGod: TenGodLabel;
64
40
  }[];
65
41
  };
66
42
  };
67
43
  month: {
68
44
  stem: {
69
45
  char: string;
70
- tenGod: TenGod;
46
+ tenGod: TenGodLabel;
71
47
  };
72
48
  branch: {
73
49
  char: string;
74
- tenGod: TenGod;
50
+ tenGod: TenGodLabel;
75
51
  hiddenStems: {
76
52
  stem: string;
77
- tenGod: TenGod;
53
+ tenGod: TenGodLabel;
78
54
  }[];
79
55
  };
80
56
  };
81
57
  day: {
82
58
  stem: {
83
59
  char: string;
84
- tenGod: "일간";
60
+ tenGod: DayMasterLabel;
85
61
  };
86
62
  branch: {
87
63
  char: string;
88
- tenGod: TenGod;
64
+ tenGod: TenGodLabel;
89
65
  hiddenStems: {
90
66
  stem: string;
91
- tenGod: TenGod;
67
+ tenGod: TenGodLabel;
92
68
  }[];
93
69
  };
94
70
  };
95
71
  hour: {
96
72
  stem: {
97
73
  char: string;
98
- tenGod: TenGod;
74
+ tenGod: TenGodLabel;
99
75
  };
100
76
  branch: {
101
77
  char: string;
102
- tenGod: TenGod;
78
+ tenGod: TenGodLabel;
103
79
  hiddenStems: {
104
80
  stem: string;
105
- tenGod: TenGod;
81
+ tenGod: TenGodLabel;
106
82
  }[];
107
83
  };
108
84
  };
109
85
  dayMaster: string;
110
86
  }
111
- /**
112
- * 사주 팔자에서 십신 분석
113
- * @param yearPillar 연주 (예: "甲子")
114
- * @param monthPillar 월주
115
- * @param dayPillar 일주
116
- * @param hourPillar 시주
117
- */
118
87
  export declare function analyzeTenGods(yearPillar: string, monthPillar: string, dayPillar: string, hourPillar: string): FourPillarsTenGods;
119
- /**
120
- * 십신 통계 (각 십신이 몇 개 있는지)
121
- */
122
- export declare function countTenGods(analysis: FourPillarsTenGods): Record<TenGod, number>;
123
- /**
124
- * 오행별 개수 (천간 + 지지 본기)
125
- */
88
+ export declare function countTenGods(analysis: FourPillarsTenGods): Record<TenGodKey, number>;
126
89
  export declare function countElements(analysis: FourPillarsTenGods): Record<Element, number>;
127
90
  //# sourceMappingURL=ten-gods.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ten-gods.d.ts","sourceRoot":"","sources":["../../src/core/ten-gods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB,MAAM,MAAM,MAAM,GACd,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC;AAET,eAAO,MAAM,QAAQ,EAAE,MAAM,EAW5B,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAWhD,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAWlD,CAAC;AAgEF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAajD,CAAC;AAsBF;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIpD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,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