@optique/temporal 0.9.0-dev.211 → 0.9.0-dev.215

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/dist/index.cjs CHANGED
@@ -41,6 +41,7 @@ function instant(options = {}) {
41
41
  const metavar = options.metavar ?? "TIMESTAMP";
42
42
  (0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
43
43
  return {
44
+ $mode: "sync",
44
45
  metavar,
45
46
  parse(input) {
46
47
  try {
@@ -77,6 +78,7 @@ function duration(options = {}) {
77
78
  const metavar = options.metavar ?? "DURATION";
78
79
  (0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
79
80
  return {
81
+ $mode: "sync",
80
82
  metavar,
81
83
  parse(input) {
82
84
  try {
@@ -112,6 +114,7 @@ function zonedDateTime(options = {}) {
112
114
  const metavar = options.metavar ?? "ZONED_DATETIME";
113
115
  (0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
114
116
  return {
117
+ $mode: "sync",
115
118
  metavar,
116
119
  parse(input) {
117
120
  try {
@@ -147,6 +150,7 @@ function plainDate(options = {}) {
147
150
  const metavar = options.metavar ?? "DATE";
148
151
  (0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
149
152
  return {
153
+ $mode: "sync",
150
154
  metavar,
151
155
  parse(input) {
152
156
  try {
@@ -182,6 +186,7 @@ function plainTime(options = {}) {
182
186
  const metavar = options.metavar ?? "TIME";
183
187
  (0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
184
188
  return {
189
+ $mode: "sync",
185
190
  metavar,
186
191
  parse(input) {
187
192
  try {
@@ -217,6 +222,7 @@ function plainDateTime(options = {}) {
217
222
  const metavar = options.metavar ?? "DATETIME";
218
223
  (0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
219
224
  return {
225
+ $mode: "sync",
220
226
  metavar,
221
227
  parse(input) {
222
228
  try {
@@ -252,6 +258,7 @@ function plainYearMonth(options = {}) {
252
258
  const metavar = options.metavar ?? "YEAR-MONTH";
253
259
  (0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
254
260
  return {
261
+ $mode: "sync",
255
262
  metavar,
256
263
  parse(input) {
257
264
  try {
@@ -287,6 +294,7 @@ function plainMonthDay(options = {}) {
287
294
  const metavar = options.metavar ?? "--MONTH-DAY";
288
295
  (0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
289
296
  return {
297
+ $mode: "sync",
290
298
  metavar,
291
299
  parse(input) {
292
300
  try {
@@ -324,6 +332,7 @@ function timeZone(options = {}) {
324
332
  const metavar = options.metavar ?? "TIMEZONE";
325
333
  (0, __optique_core_nonempty.ensureNonEmptyString)(metavar);
326
334
  return {
335
+ $mode: "sync",
327
336
  metavar,
328
337
  parse(input) {
329
338
  try {
package/dist/index.d.cts CHANGED
@@ -249,7 +249,7 @@ interface TimeZoneOptions {
249
249
  * @param options Configuration options for the instant parser.
250
250
  * @returns A ValueParser that parses strings into Temporal.Instant values.
251
251
  */
252
- declare function instant(options?: InstantOptions): ValueParser<Temporal.Instant>;
252
+ declare function instant(options?: InstantOptions): ValueParser<"sync", Temporal.Instant>;
253
253
  /**
254
254
  * Creates a ValueParser for parsing Temporal.Duration from ISO 8601 duration strings.
255
255
  *
@@ -262,7 +262,7 @@ declare function instant(options?: InstantOptions): ValueParser<Temporal.Instant
262
262
  * @param options Configuration options for the duration parser.
263
263
  * @returns A ValueParser that parses strings into Temporal.Duration values.
264
264
  */
265
- declare function duration(options?: DurationOptions): ValueParser<Temporal.Duration>;
265
+ declare function duration(options?: DurationOptions): ValueParser<"sync", Temporal.Duration>;
266
266
  /**
267
267
  * Creates a ValueParser for parsing Temporal.ZonedDateTime from ISO 8601 strings with timezone.
268
268
  *
@@ -274,7 +274,7 @@ declare function duration(options?: DurationOptions): ValueParser<Temporal.Durat
274
274
  * @param options Configuration options for the zoned datetime parser.
275
275
  * @returns A ValueParser that parses strings into Temporal.ZonedDateTime values.
276
276
  */
277
- declare function zonedDateTime(options?: ZonedDateTimeOptions): ValueParser<Temporal.ZonedDateTime>;
277
+ declare function zonedDateTime(options?: ZonedDateTimeOptions): ValueParser<"sync", Temporal.ZonedDateTime>;
278
278
  /**
279
279
  * Creates a ValueParser for parsing Temporal.PlainDate from ISO 8601 date strings.
280
280
  *
@@ -286,7 +286,7 @@ declare function zonedDateTime(options?: ZonedDateTimeOptions): ValueParser<Temp
286
286
  * @param options Configuration options for the plain date parser.
287
287
  * @returns A ValueParser that parses strings into Temporal.PlainDate values.
288
288
  */
289
- declare function plainDate(options?: PlainDateOptions): ValueParser<Temporal.PlainDate>;
289
+ declare function plainDate(options?: PlainDateOptions): ValueParser<"sync", Temporal.PlainDate>;
290
290
  /**
291
291
  * Creates a ValueParser for parsing Temporal.PlainTime from ISO 8601 time strings.
292
292
  *
@@ -298,7 +298,7 @@ declare function plainDate(options?: PlainDateOptions): ValueParser<Temporal.Pla
298
298
  * @param options Configuration options for the plain time parser.
299
299
  * @returns A ValueParser that parses strings into Temporal.PlainTime values.
300
300
  */
301
- declare function plainTime(options?: PlainTimeOptions): ValueParser<Temporal.PlainTime>;
301
+ declare function plainTime(options?: PlainTimeOptions): ValueParser<"sync", Temporal.PlainTime>;
302
302
  /**
303
303
  * Creates a ValueParser for parsing Temporal.PlainDateTime from ISO 8601 datetime strings.
304
304
  *
@@ -310,7 +310,7 @@ declare function plainTime(options?: PlainTimeOptions): ValueParser<Temporal.Pla
310
310
  * @param options Configuration options for the plain datetime parser.
311
311
  * @returns A ValueParser that parses strings into Temporal.PlainDateTime values.
312
312
  */
313
- declare function plainDateTime(options?: PlainDateTimeOptions): ValueParser<Temporal.PlainDateTime>;
313
+ declare function plainDateTime(options?: PlainDateTimeOptions): ValueParser<"sync", Temporal.PlainDateTime>;
314
314
  /**
315
315
  * Creates a ValueParser for parsing Temporal.PlainYearMonth from ISO 8601 year-month strings.
316
316
  *
@@ -322,7 +322,7 @@ declare function plainDateTime(options?: PlainDateTimeOptions): ValueParser<Temp
322
322
  * @param options Configuration options for the plain year-month parser.
323
323
  * @returns A ValueParser that parses strings into Temporal.PlainYearMonth values.
324
324
  */
325
- declare function plainYearMonth(options?: PlainYearMonthOptions): ValueParser<Temporal.PlainYearMonth>;
325
+ declare function plainYearMonth(options?: PlainYearMonthOptions): ValueParser<"sync", Temporal.PlainYearMonth>;
326
326
  /**
327
327
  * Creates a ValueParser for parsing Temporal.PlainMonthDay from ISO 8601 month-day strings.
328
328
  *
@@ -334,7 +334,7 @@ declare function plainYearMonth(options?: PlainYearMonthOptions): ValueParser<Te
334
334
  * @param options Configuration options for the plain month-day parser.
335
335
  * @returns A ValueParser that parses strings into Temporal.PlainMonthDay values.
336
336
  */
337
- declare function plainMonthDay(options?: PlainMonthDayOptions): ValueParser<Temporal.PlainMonthDay>;
337
+ declare function plainMonthDay(options?: PlainMonthDayOptions): ValueParser<"sync", Temporal.PlainMonthDay>;
338
338
  /**
339
339
  * Creates a ValueParser for parsing IANA Time Zone Database identifiers.
340
340
  *
@@ -348,6 +348,6 @@ declare function plainMonthDay(options?: PlainMonthDayOptions): ValueParser<Temp
348
348
  * @param options Configuration options for the timezone parser.
349
349
  * @returns A ValueParser that parses and validates timezone identifiers.
350
350
  */
351
- declare function timeZone(options?: TimeZoneOptions): ValueParser<TimeZone>;
351
+ declare function timeZone(options?: TimeZoneOptions): ValueParser<"sync", TimeZone>;
352
352
  //#endregion
353
353
  export { DurationOptions, InstantOptions, PlainDateOptions, PlainDateTimeOptions, PlainMonthDayOptions, PlainTimeOptions, PlainYearMonthOptions, TimeZone, TimeZoneOptions, ZonedDateTimeOptions, duration, instant, plainDate, plainDateTime, plainMonthDay, plainTime, plainYearMonth, timeZone, zonedDateTime };
package/dist/index.d.ts CHANGED
@@ -250,7 +250,7 @@ interface TimeZoneOptions {
250
250
  * @param options Configuration options for the instant parser.
251
251
  * @returns A ValueParser that parses strings into Temporal.Instant values.
252
252
  */
253
- declare function instant(options?: InstantOptions): ValueParser<Temporal.Instant>;
253
+ declare function instant(options?: InstantOptions): ValueParser<"sync", Temporal.Instant>;
254
254
  /**
255
255
  * Creates a ValueParser for parsing Temporal.Duration from ISO 8601 duration strings.
256
256
  *
@@ -263,7 +263,7 @@ declare function instant(options?: InstantOptions): ValueParser<Temporal.Instant
263
263
  * @param options Configuration options for the duration parser.
264
264
  * @returns A ValueParser that parses strings into Temporal.Duration values.
265
265
  */
266
- declare function duration(options?: DurationOptions): ValueParser<Temporal.Duration>;
266
+ declare function duration(options?: DurationOptions): ValueParser<"sync", Temporal.Duration>;
267
267
  /**
268
268
  * Creates a ValueParser for parsing Temporal.ZonedDateTime from ISO 8601 strings with timezone.
269
269
  *
@@ -275,7 +275,7 @@ declare function duration(options?: DurationOptions): ValueParser<Temporal.Durat
275
275
  * @param options Configuration options for the zoned datetime parser.
276
276
  * @returns A ValueParser that parses strings into Temporal.ZonedDateTime values.
277
277
  */
278
- declare function zonedDateTime(options?: ZonedDateTimeOptions): ValueParser<Temporal.ZonedDateTime>;
278
+ declare function zonedDateTime(options?: ZonedDateTimeOptions): ValueParser<"sync", Temporal.ZonedDateTime>;
279
279
  /**
280
280
  * Creates a ValueParser for parsing Temporal.PlainDate from ISO 8601 date strings.
281
281
  *
@@ -287,7 +287,7 @@ declare function zonedDateTime(options?: ZonedDateTimeOptions): ValueParser<Temp
287
287
  * @param options Configuration options for the plain date parser.
288
288
  * @returns A ValueParser that parses strings into Temporal.PlainDate values.
289
289
  */
290
- declare function plainDate(options?: PlainDateOptions): ValueParser<Temporal.PlainDate>;
290
+ declare function plainDate(options?: PlainDateOptions): ValueParser<"sync", Temporal.PlainDate>;
291
291
  /**
292
292
  * Creates a ValueParser for parsing Temporal.PlainTime from ISO 8601 time strings.
293
293
  *
@@ -299,7 +299,7 @@ declare function plainDate(options?: PlainDateOptions): ValueParser<Temporal.Pla
299
299
  * @param options Configuration options for the plain time parser.
300
300
  * @returns A ValueParser that parses strings into Temporal.PlainTime values.
301
301
  */
302
- declare function plainTime(options?: PlainTimeOptions): ValueParser<Temporal.PlainTime>;
302
+ declare function plainTime(options?: PlainTimeOptions): ValueParser<"sync", Temporal.PlainTime>;
303
303
  /**
304
304
  * Creates a ValueParser for parsing Temporal.PlainDateTime from ISO 8601 datetime strings.
305
305
  *
@@ -311,7 +311,7 @@ declare function plainTime(options?: PlainTimeOptions): ValueParser<Temporal.Pla
311
311
  * @param options Configuration options for the plain datetime parser.
312
312
  * @returns A ValueParser that parses strings into Temporal.PlainDateTime values.
313
313
  */
314
- declare function plainDateTime(options?: PlainDateTimeOptions): ValueParser<Temporal.PlainDateTime>;
314
+ declare function plainDateTime(options?: PlainDateTimeOptions): ValueParser<"sync", Temporal.PlainDateTime>;
315
315
  /**
316
316
  * Creates a ValueParser for parsing Temporal.PlainYearMonth from ISO 8601 year-month strings.
317
317
  *
@@ -323,7 +323,7 @@ declare function plainDateTime(options?: PlainDateTimeOptions): ValueParser<Temp
323
323
  * @param options Configuration options for the plain year-month parser.
324
324
  * @returns A ValueParser that parses strings into Temporal.PlainYearMonth values.
325
325
  */
326
- declare function plainYearMonth(options?: PlainYearMonthOptions): ValueParser<Temporal.PlainYearMonth>;
326
+ declare function plainYearMonth(options?: PlainYearMonthOptions): ValueParser<"sync", Temporal.PlainYearMonth>;
327
327
  /**
328
328
  * Creates a ValueParser for parsing Temporal.PlainMonthDay from ISO 8601 month-day strings.
329
329
  *
@@ -335,7 +335,7 @@ declare function plainYearMonth(options?: PlainYearMonthOptions): ValueParser<Te
335
335
  * @param options Configuration options for the plain month-day parser.
336
336
  * @returns A ValueParser that parses strings into Temporal.PlainMonthDay values.
337
337
  */
338
- declare function plainMonthDay(options?: PlainMonthDayOptions): ValueParser<Temporal.PlainMonthDay>;
338
+ declare function plainMonthDay(options?: PlainMonthDayOptions): ValueParser<"sync", Temporal.PlainMonthDay>;
339
339
  /**
340
340
  * Creates a ValueParser for parsing IANA Time Zone Database identifiers.
341
341
  *
@@ -349,6 +349,6 @@ declare function plainMonthDay(options?: PlainMonthDayOptions): ValueParser<Temp
349
349
  * @param options Configuration options for the timezone parser.
350
350
  * @returns A ValueParser that parses and validates timezone identifiers.
351
351
  */
352
- declare function timeZone(options?: TimeZoneOptions): ValueParser<TimeZone>;
352
+ declare function timeZone(options?: TimeZoneOptions): ValueParser<"sync", TimeZone>;
353
353
  //#endregion
354
354
  export { DurationOptions, InstantOptions, PlainDateOptions, PlainDateTimeOptions, PlainMonthDayOptions, PlainTimeOptions, PlainYearMonthOptions, TimeZone, TimeZoneOptions, ZonedDateTimeOptions, duration, instant, plainDate, plainDateTime, plainMonthDay, plainTime, plainYearMonth, timeZone, zonedDateTime };
package/dist/index.js CHANGED
@@ -18,6 +18,7 @@ function instant(options = {}) {
18
18
  const metavar = options.metavar ?? "TIMESTAMP";
19
19
  ensureNonEmptyString(metavar);
20
20
  return {
21
+ $mode: "sync",
21
22
  metavar,
22
23
  parse(input) {
23
24
  try {
@@ -54,6 +55,7 @@ function duration(options = {}) {
54
55
  const metavar = options.metavar ?? "DURATION";
55
56
  ensureNonEmptyString(metavar);
56
57
  return {
58
+ $mode: "sync",
57
59
  metavar,
58
60
  parse(input) {
59
61
  try {
@@ -89,6 +91,7 @@ function zonedDateTime(options = {}) {
89
91
  const metavar = options.metavar ?? "ZONED_DATETIME";
90
92
  ensureNonEmptyString(metavar);
91
93
  return {
94
+ $mode: "sync",
92
95
  metavar,
93
96
  parse(input) {
94
97
  try {
@@ -124,6 +127,7 @@ function plainDate(options = {}) {
124
127
  const metavar = options.metavar ?? "DATE";
125
128
  ensureNonEmptyString(metavar);
126
129
  return {
130
+ $mode: "sync",
127
131
  metavar,
128
132
  parse(input) {
129
133
  try {
@@ -159,6 +163,7 @@ function plainTime(options = {}) {
159
163
  const metavar = options.metavar ?? "TIME";
160
164
  ensureNonEmptyString(metavar);
161
165
  return {
166
+ $mode: "sync",
162
167
  metavar,
163
168
  parse(input) {
164
169
  try {
@@ -194,6 +199,7 @@ function plainDateTime(options = {}) {
194
199
  const metavar = options.metavar ?? "DATETIME";
195
200
  ensureNonEmptyString(metavar);
196
201
  return {
202
+ $mode: "sync",
197
203
  metavar,
198
204
  parse(input) {
199
205
  try {
@@ -229,6 +235,7 @@ function plainYearMonth(options = {}) {
229
235
  const metavar = options.metavar ?? "YEAR-MONTH";
230
236
  ensureNonEmptyString(metavar);
231
237
  return {
238
+ $mode: "sync",
232
239
  metavar,
233
240
  parse(input) {
234
241
  try {
@@ -264,6 +271,7 @@ function plainMonthDay(options = {}) {
264
271
  const metavar = options.metavar ?? "--MONTH-DAY";
265
272
  ensureNonEmptyString(metavar);
266
273
  return {
274
+ $mode: "sync",
267
275
  metavar,
268
276
  parse(input) {
269
277
  try {
@@ -301,6 +309,7 @@ function timeZone(options = {}) {
301
309
  const metavar = options.metavar ?? "TIMEZONE";
302
310
  ensureNonEmptyString(metavar);
303
311
  return {
312
+ $mode: "sync",
304
313
  metavar,
305
314
  parse(input) {
306
315
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/temporal",
3
- "version": "0.9.0-dev.211+322b48ee",
3
+ "version": "0.9.0-dev.215+13b302c0",
4
4
  "description": "Temporal value parsers for Optique",
5
5
  "keywords": [
6
6
  "CLI",