(minute: number)
| 1060 | |
| 1061 | /** @internal */ |
| 1062 | export const minuteOfHour = (minute: number): Schedule.Schedule<number> => |
| 1063 | makeWithState<[number, number], unknown, number>( |
| 1064 | [Number.MIN_SAFE_INTEGER, 0], |
| 1065 | (now, _, state) => { |
| 1066 | if (!Number.isInteger(minute) || minute < 0 || 59 < minute) { |
| 1067 | return core.dieSync(() => |
| 1068 | new core.IllegalArgumentException( |
| 1069 | `Invalid argument in: minuteOfHour(${minute}). Must be in range 0...59` |
| 1070 | ) |
| 1071 | ) |
| 1072 | } |
| 1073 | const n = state[1] |
| 1074 | const initial = n === 0 |
| 1075 | const minute0 = nextMinute(now, minute, initial) |
| 1076 | const start = beginningOfMinute(minute0) |
| 1077 | const end = endOfMinute(minute0) |
| 1078 | const interval = Interval.make(start, end) |
| 1079 | return core.succeed( |
| 1080 | [ |
| 1081 | [end, n + 1], |
| 1082 | n, |
| 1083 | ScheduleDecision.continueWith(interval) |
| 1084 | ] |
| 1085 | ) |
| 1086 | } |
| 1087 | ) |
| 1088 | |
| 1089 | /** @internal */ |
| 1090 | export const modifyDelay = dual< |
nothing calls this directly
no test coverage detected
searching dependent graphs…