Skip to content

Commit

Permalink
Fix definition of const enum flags in .d.ts (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Nov 5, 2023
1 parent 49498e1 commit dd5b87f
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 92 deletions.
77 changes: 52 additions & 25 deletions hebcal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,58 @@ declare module '@hebcal/core' {
* Holiday flags for Event
*/
export const enum flags {
CHAG,
LIGHT_CANDLES,
YOM_TOV_ENDS,
CHUL_ONLY,
IL_ONLY,
LIGHT_CANDLES_TZEIS,
CHANUKAH_CANDLES,
ROSH_CHODESH,
MINOR_FAST,
SPECIAL_SHABBAT,
PARSHA_HASHAVUA,
DAF_YOMI,
OMER_COUNT,
MODERN_HOLIDAY,
MAJOR_FAST,
SHABBAT_MEVARCHIM,
MOLAD,
USER_EVENT,
HEBREW_DATE,
MINOR_HOLIDAY,
EREV,
CHOL_HAMOED,
MISHNA_YOMI,
YERUSHALMI_YOMI,
NACH_YOMI,
/** Chag, yontiff, yom tov */
CHAG = 0x000001,
/** Light candles 18 minutes before sundown */
LIGHT_CANDLES = 0x000002,
/** End of holiday (end of Yom Tov) */
YOM_TOV_ENDS = 0x000004,
/** Observed only in the Diaspora (chutz l'aretz) */
CHUL_ONLY = 0x000008,
/** Observed only in Israel */
IL_ONLY = 0x000010,
/** Light candles in the evening at Tzeit time (3 small stars) */
LIGHT_CANDLES_TZEIS = 0x000020,
/** Candle-lighting for Chanukah */
CHANUKAH_CANDLES = 0x000040,
/** Rosh Chodesh, beginning of a new Hebrew month */
ROSH_CHODESH = 0x000080,
/** Minor fasts like Tzom Tammuz, Ta'anit Esther, ... */
MINOR_FAST = 0x000100,
/** Shabbat Shekalim, Zachor, ... */
SPECIAL_SHABBAT = 0x000200,
/** Weekly sedrot on Saturdays */
PARSHA_HASHAVUA = 0x000400,
/** Daily page of Talmud (Bavli) */
DAF_YOMI = 0x000800,
/** Days of the Omer */
OMER_COUNT = 0x001000,
/** Yom HaShoah, Yom HaAtzma'ut, ... */
MODERN_HOLIDAY = 0x002000,
/** Yom Kippur and Tish'a B'Av */
MAJOR_FAST = 0x004000,
/** On the Saturday before Rosh Chodesh */
SHABBAT_MEVARCHIM = 0x008000,
/** Molad */
MOLAD = 0x010000,
/** Yahrzeit or Hebrew Anniversary */
USER_EVENT = 0x020000,
/** Daily Hebrew date ("11th of Sivan, 5780") */
HEBREW_DATE = 0x040000,
/** A holiday that's not major, modern, rosh chodesh, or a fast day */
MINOR_HOLIDAY = 0x080000,
/** Evening before a major or minor holiday */
EREV = 0x100000,
/** Chol haMoed, intermediate days of Pesach or Sukkot */
CHOL_HAMOED = 0x200000,
/** Mishna Yomi */
MISHNA_YOMI = 0x400000,
/** Yom Kippur Katan, minor day of atonement on the day preceeding each Rosh Chodesh */
YOM_KIPPUR_KATAN = 0x800000,
/** Daily page of Jerusalem Talmud (Yerushalmi) */
YERUSHALMI_YOMI = 0x1000000,
/** Nach Yomi */
NACH_YOMI = 0x2000000,
}

export type UnitTypeShort = 'd' | 'w' | 'M' | 'y';
Expand Down
128 changes: 64 additions & 64 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hebcal/core",
"version": "4.5.0",
"version": "4.5.1",
"author": "Michael J. Radwin (https://github.com/mjradwin)",
"contributors": [
"Eyal Schachter (https://github.com/Scimonster)",
Expand Down Expand Up @@ -71,12 +71,12 @@
"@rollup/plugin-terser": "^0.4.4",
"ava": "^5.3.1",
"core-js": "^3.33.2",
"eslint": "^8.52.0",
"eslint": "^8.53.0",
"eslint-config-google": "^0.14.0",
"jsdoc": "^4.0.2",
"jsdoc-to-markdown": "^8.0.0",
"nyc": "^15.1.0",
"rollup": "^4.2.0",
"rollup": "^4.3.0",
"ttag-cli": "^1.10.6"
}
}

0 comments on commit dd5b87f

Please sign in to comment.