@cratis/fundamentals 7.22.3 → 7.22.5

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 (90) hide show
  1. package/DateOnly.ts +28 -1
  2. package/JsonSerializer.ts +36 -14
  3. package/TimeOnly.ts +51 -11
  4. package/TimeSpan.ts +26 -1
  5. package/dist/DateOnly.d.ts +1 -0
  6. package/dist/DateOnly.d.ts.map +1 -1
  7. package/dist/DateOnly.js +21 -1
  8. package/dist/DateOnly.js.map +1 -1
  9. package/dist/JsonSerializer.d.ts.map +1 -1
  10. package/dist/JsonSerializer.js +29 -9
  11. package/dist/JsonSerializer.js.map +1 -1
  12. package/dist/TimeOnly.d.ts +2 -1
  13. package/dist/TimeOnly.d.ts.map +1 -1
  14. package/dist/TimeOnly.js +30 -4
  15. package/dist/TimeOnly.js.map +1 -1
  16. package/dist/TimeSpan.d.ts.map +1 -1
  17. package/dist/TimeSpan.js +17 -0
  18. package/dist/TimeSpan.js.map +1 -1
  19. package/dist/cjs/DateOnly.d.ts +1 -0
  20. package/dist/cjs/DateOnly.d.ts.map +1 -1
  21. package/dist/cjs/DateOnly.js +21 -1
  22. package/dist/cjs/DateOnly.js.map +1 -1
  23. package/dist/cjs/JsonSerializer.d.ts.map +1 -1
  24. package/dist/cjs/JsonSerializer.js +28 -8
  25. package/dist/cjs/JsonSerializer.js.map +1 -1
  26. package/dist/cjs/TimeOnly.d.ts +2 -1
  27. package/dist/cjs/TimeOnly.d.ts.map +1 -1
  28. package/dist/cjs/TimeOnly.js +30 -4
  29. package/dist/cjs/TimeOnly.js.map +1 -1
  30. package/dist/cjs/TimeSpan.d.ts.map +1 -1
  31. package/dist/cjs/TimeSpan.js +17 -0
  32. package/dist/cjs/TimeSpan.js.map +1 -1
  33. package/dist/cjs/index.js +3 -0
  34. package/dist/cjs/index.js.map +1 -1
  35. package/dist/cjs/typeKey.d.ts +3 -0
  36. package/dist/cjs/typeKey.d.ts.map +1 -1
  37. package/dist/cjs/typeKey.js +6 -0
  38. package/dist/cjs/typeKey.js.map +1 -1
  39. package/dist/esm/DateOnly.d.ts +1 -0
  40. package/dist/esm/DateOnly.d.ts.map +1 -1
  41. package/dist/esm/DateOnly.js +21 -1
  42. package/dist/esm/DateOnly.js.map +1 -1
  43. package/dist/esm/JsonSerializer.d.ts.map +1 -1
  44. package/dist/esm/JsonSerializer.js +29 -9
  45. package/dist/esm/JsonSerializer.js.map +1 -1
  46. package/dist/esm/TimeOnly.d.ts +2 -1
  47. package/dist/esm/TimeOnly.d.ts.map +1 -1
  48. package/dist/esm/TimeOnly.js +30 -4
  49. package/dist/esm/TimeOnly.js.map +1 -1
  50. package/dist/esm/TimeSpan.d.ts.map +1 -1
  51. package/dist/esm/TimeSpan.js +17 -0
  52. package/dist/esm/TimeSpan.js.map +1 -1
  53. package/dist/esm/index.js +1 -1
  54. package/dist/esm/typeKey.d.ts +3 -0
  55. package/dist/esm/typeKey.d.ts.map +1 -1
  56. package/dist/esm/typeKey.js +4 -1
  57. package/dist/esm/typeKey.js.map +1 -1
  58. package/dist/tsconfig.tsbuildinfo +1 -1
  59. package/dist/typeKey.d.ts +3 -0
  60. package/dist/typeKey.d.ts.map +1 -1
  61. package/dist/typeKey.js +3 -0
  62. package/dist/typeKey.js.map +1 -1
  63. package/for_DateOnly/when_parsing_an_out_of_range_calendar_date.ts +13 -0
  64. package/for_DateOnly/when_parsing_february_in_leap_and_common_years.ts +11 -0
  65. package/for_JsonSerializer/when_deserializing_a_value_map_with_c_sharp_written_negative_time_span_keys.ts +19 -0
  66. package/for_JsonSerializer/when_deserializing_a_value_map_with_c_sharp_written_time_only_keys.ts +19 -0
  67. package/for_JsonSerializer/when_deserializing_a_value_map_with_c_sharp_written_whole_second_time_span_keys.ts +19 -0
  68. package/for_JsonSerializer/when_deserializing_a_value_map_with_legacy_quoted_date_only_keys.ts +19 -0
  69. package/for_JsonSerializer/when_deserializing_a_value_map_with_legacy_quoted_time_only_keys.ts +19 -0
  70. package/for_JsonSerializer/when_deserializing_a_value_map_with_legacy_quoted_time_span_keys.ts +19 -0
  71. package/for_JsonSerializer/when_deserializing_a_value_map_with_malformed_date_only_keys.ts +20 -0
  72. package/for_JsonSerializer/when_deserializing_a_value_map_with_malformed_time_only_keys.ts +20 -0
  73. package/for_JsonSerializer/when_deserializing_a_value_map_with_malformed_time_span_keys.ts +20 -0
  74. package/for_JsonSerializer/when_deserializing_a_value_map_with_out_of_range_temporal_keys.ts +19 -0
  75. package/for_JsonSerializer/when_deserializing_out_of_range_temporal_values.ts +20 -0
  76. package/for_JsonSerializer/when_round_tripping_a_value_map_with_date_only_keys.ts +26 -0
  77. package/for_JsonSerializer/when_round_tripping_a_value_map_with_time_only_keys.ts +26 -0
  78. package/for_JsonSerializer/when_round_tripping_a_value_map_with_time_only_keys_differing_below_a_millisecond.ts +20 -0
  79. package/for_JsonSerializer/when_round_tripping_a_value_map_with_time_span_keys.ts +26 -0
  80. package/for_TimeOnly/when_creating_with_out_of_range_sub_millisecond_ticks.ts +11 -0
  81. package/for_TimeOnly/when_parsing_an_out_of_range_time_of_day.ts +11 -0
  82. package/for_TimeOnly/when_parsing_the_last_moment_of_the_day.ts +10 -0
  83. package/for_TimeOnly/when_parsing_the_shapes_the_server_sends.ts +6 -6
  84. package/for_TimeOnly/when_parsing_times_that_differ_below_a_millisecond.ts +14 -0
  85. package/for_TimeOnly/when_rendering_a_fraction.ts +11 -0
  86. package/for_TimeSpan/when_parsing_out_of_range_time.ts +11 -0
  87. package/for_TimeSpan/when_parsing_the_largest_in_range_time_span.ts +10 -0
  88. package/for_TimeSpan/when_parsing_time_beyond_what_a_time_span_can_hold.ts +11 -0
  89. package/package.json +1 -1
  90. package/typeKey.ts +9 -0
@@ -4,6 +4,9 @@ const typeKeyOf = (type) => type ? type[typeKey] : undefined;
4
4
  const conceptAsTypeKey = 'ConceptAs';
5
5
  const valueMapTypeKey = 'ValueMap';
6
6
  const guidTypeKey = 'Guid';
7
+ const dateOnlyTypeKey = 'DateOnly';
8
+ const timeOnlyTypeKey = 'TimeOnly';
9
+ const timeSpanTypeKey = 'TimeSpan';
7
10
 
8
- export { conceptAsTypeKey, declaredTypeKey, guidTypeKey, typeKey, typeKeyOf, valueMapTypeKey };
11
+ export { conceptAsTypeKey, dateOnlyTypeKey, declaredTypeKey, guidTypeKey, timeOnlyTypeKey, timeSpanTypeKey, typeKey, typeKeyOf, valueMapTypeKey };
9
12
  //# sourceMappingURL=typeKey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeKey.js","sources":["../../typeKey.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Constructor } from './Constructor';\n\n/**\n * Identifies a type this package converts, by name rather than by the class object itself.\n *\n * `JsonSerializer` recognized a type by comparing constructors, which holds until a second copy of this\n * package is loaded into the same realm - a nested install, or one install reached as both ESM and\n * CommonJS. Each copy then had its own `Guid`, `ConceptAs` and `ValueMap` class objects and neither\n * recognized the other's, so a `Guid` crossing that boundary was written as an object rather than a\n * string, and a concept as `{\"value\": ...}` rather than its underlying value. Both silently.\n *\n * A name survives the boundary where a class object does not: the key is a registered symbol, so every\n * copy resolves the same one, and the values are plain strings.\n *\n * The key is deliberately a symbol rather than a plain static: a string static would appear in\n * `Object.keys(Guid)` and could be shadowed by an unrelated member of the same name.\n */\nexport const typeKey: unique symbol = Symbol.for('@cratis/fundamentals.typeKey');\n\n/** A type carrying the key. Only this package's own convertible types declare one. */\ntype KeyedType = Constructor & { readonly [typeKey]?: string };\n\n/**\n * Gets the key a type declares itself, ignoring any inherited from a base type.\n *\n * Converter lookup uses this, because a key is inherited: a consumer's `class CustomerId extends\n * ConceptAs<string>` reports `ConceptAs`, and registering a converter under that would take the place\n * of concept handling for every concept in the application.\n * @param {Constructor} type The type to read the key from.\n * @returns {string | undefined} The declared key, or undefined when the type declares none.\n */\nexport const declaredTypeKey = (type: Constructor | undefined): string | undefined =>\n type && Object.prototype.hasOwnProperty.call(type, typeKey) ? (type as KeyedType)[typeKey] : undefined;\n\n/**\n * Gets the key a type carries, whether it declares the key or inherits it from a base type.\n *\n * This is what makes a concept recognizable across copies: the key is a static, and a static is\n * inherited through the constructor's prototype chain, so every type deriving from `ConceptAs` reports\n * `ConceptAs` without anything having to compare class objects.\n * @param {Constructor} type The type to read the key from.\n * @returns {string | undefined} The key carried, or undefined when the type carries none.\n */\nexport const typeKeyOf = (type: Constructor | undefined): string | undefined =>\n type ? (type as KeyedType)[typeKey] : undefined;\n\n/** The key every type deriving from `ConceptAs` carries. */\nexport const conceptAsTypeKey = 'ConceptAs';\n\n/** The key `ValueMap` declares. */\nexport const valueMapTypeKey = 'ValueMap';\n\n/** The key `Guid` declares. */\nexport const guidTypeKey = 'Guid';\n"],"names":[],"mappings":"AAoBO,MAAM,OAAO,GAAkB,MAAM,CAAC,GAAG,CAAC,8BAA8B;AAcxE,MAAM,eAAe,GAAG,CAAC,IAA6B,KACzD,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,GAAI,IAAkB,CAAC,OAAO,CAAC,GAAG;MAWpF,SAAS,GAAG,CAAC,IAA6B,KACnD,IAAI,GAAI,IAAkB,CAAC,OAAO,CAAC,GAAG;AAGnC,MAAM,gBAAgB,GAAG;AAGzB,MAAM,eAAe,GAAG;AAGxB,MAAM,WAAW,GAAG;;"}
1
+ {"version":3,"file":"typeKey.js","sources":["../../typeKey.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Constructor } from './Constructor';\n\n/**\n * Identifies a type this package converts, by name rather than by the class object itself.\n *\n * `JsonSerializer` recognized a type by comparing constructors, which holds until a second copy of this\n * package is loaded into the same realm - a nested install, or one install reached as both ESM and\n * CommonJS. Each copy then had its own `Guid`, `ConceptAs` and `ValueMap` class objects and neither\n * recognized the other's, so a `Guid` crossing that boundary was written as an object rather than a\n * string, and a concept as `{\"value\": ...}` rather than its underlying value. Both silently.\n *\n * A name survives the boundary where a class object does not: the key is a registered symbol, so every\n * copy resolves the same one, and the values are plain strings.\n *\n * The key is deliberately a symbol rather than a plain static: a string static would appear in\n * `Object.keys(Guid)` and could be shadowed by an unrelated member of the same name.\n */\nexport const typeKey: unique symbol = Symbol.for('@cratis/fundamentals.typeKey');\n\n/** A type carrying the key. Only this package's own convertible types declare one. */\ntype KeyedType = Constructor & { readonly [typeKey]?: string };\n\n/**\n * Gets the key a type declares itself, ignoring any inherited from a base type.\n *\n * Converter lookup uses this, because a key is inherited: a consumer's `class CustomerId extends\n * ConceptAs<string>` reports `ConceptAs`, and registering a converter under that would take the place\n * of concept handling for every concept in the application.\n * @param {Constructor} type The type to read the key from.\n * @returns {string | undefined} The declared key, or undefined when the type declares none.\n */\nexport const declaredTypeKey = (type: Constructor | undefined): string | undefined =>\n type && Object.prototype.hasOwnProperty.call(type, typeKey) ? (type as KeyedType)[typeKey] : undefined;\n\n/**\n * Gets the key a type carries, whether it declares the key or inherits it from a base type.\n *\n * This is what makes a concept recognizable across copies: the key is a static, and a static is\n * inherited through the constructor's prototype chain, so every type deriving from `ConceptAs` reports\n * `ConceptAs` without anything having to compare class objects.\n * @param {Constructor} type The type to read the key from.\n * @returns {string | undefined} The key carried, or undefined when the type carries none.\n */\nexport const typeKeyOf = (type: Constructor | undefined): string | undefined =>\n type ? (type as KeyedType)[typeKey] : undefined;\n\n/** The key every type deriving from `ConceptAs` carries. */\nexport const conceptAsTypeKey = 'ConceptAs';\n\n/** The key `ValueMap` declares. */\nexport const valueMapTypeKey = 'ValueMap';\n\n/** The key `Guid` declares. */\nexport const guidTypeKey = 'Guid';\n\n/** The key `DateOnly` declares. */\nexport const dateOnlyTypeKey = 'DateOnly';\n\n/** The key `TimeOnly` declares. */\nexport const timeOnlyTypeKey = 'TimeOnly';\n\n/** The key `TimeSpan` declares. */\nexport const timeSpanTypeKey = 'TimeSpan';\n"],"names":[],"mappings":"AAoBO,MAAM,OAAO,GAAkB,MAAM,CAAC,GAAG,CAAC,8BAA8B;AAcxE,MAAM,eAAe,GAAG,CAAC,IAA6B,KACzD,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,GAAI,IAAkB,CAAC,OAAO,CAAC,GAAG;MAWpF,SAAS,GAAG,CAAC,IAA6B,KACnD,IAAI,GAAI,IAAkB,CAAC,OAAO,CAAC,GAAG;AAGnC,MAAM,gBAAgB,GAAG;AAGzB,MAAM,eAAe,GAAG;AAGxB,MAAM,WAAW,GAAG;AAGpB,MAAM,eAAe,GAAG;AAGxB,MAAM,eAAe,GAAG;AAGxB,MAAM,eAAe,GAAG;;"}
@@ -1 +1 @@
1
- {"version":"7.0.2","root":[[92,131]],"packageJsons":["../node_modules/tslib/modules/package.json","../node_modules/tslib/package.json","../package.json"],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.es2023.d.ts","lib.es2024.d.ts","lib.es2025.d.ts","lib.esnext.d.ts","lib.dom.d.ts","lib.dom.iterable.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.es2023.array.d.ts","lib.es2023.collection.d.ts","lib.es2023.intl.d.ts","lib.es2024.arraybuffer.d.ts","lib.es2024.collection.d.ts","lib.es2024.object.d.ts","lib.es2024.promise.d.ts","lib.es2024.regexp.d.ts","lib.es2024.sharedmemory.d.ts","lib.es2024.string.d.ts","lib.es2025.collection.d.ts","lib.es2025.float16.d.ts","lib.es2025.intl.d.ts","lib.es2025.iterator.d.ts","lib.es2025.promise.d.ts","lib.es2025.regexp.d.ts","lib.esnext.array.d.ts","lib.esnext.collection.d.ts","lib.esnext.date.d.ts","lib.esnext.decorators.d.ts","lib.esnext.disposable.d.ts","lib.esnext.error.d.ts","lib.esnext.intl.d.ts","lib.esnext.sharedmemory.d.ts","lib.esnext.temporal.d.ts","lib.esnext.typedarrays.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","../node_modules/tslib/tslib.d.ts","../node_modules/tslib/modules/index.d.ts","../Constructor.ts","../typeKey.ts","../ConceptAs.ts","../Field.ts","../reflection.ts","../fieldDecoratorMetadata.ts","../Fields.ts","../StandardFieldDecoratorContext.ts","../fieldDecorator.ts","../DateOnly.ts","../DerivedType.ts","../IEquatable.ts","../Guid.ts","../duplicateInstanceGuard.ts","../ValueMap.ts","../json/JsonConverter.ts","../json/DateJsonConverter.ts","../json/DateOnlyJsonConverter.ts","../json/GuidJsonConverter.ts","../TimeOnly.ts","../json/TimeOnlyJsonConverter.ts","../TimeSpan.ts","../json/TimeSpanJsonConverter.ts","../geospatial/Point.ts","../geospatial/LinearRing.ts","../geospatial/LineString.ts","../geospatial/Polygon.ts","../geospatial/index.ts","../json/PointJsonConverter.ts","../json/LineStringJsonConverter.ts","../json/PolygonJsonConverter.ts","../json/ValueMapJsonConverter.ts","../json/index.ts","../JsonSerializer.ts","../PropertyAccessor.ts","../PropertyAccessorDescriptor.ts","../PropertyPathResolverProxyHandler.ts","../StandardClassDecoratorContext.ts","../derivedTypeDecorator.ts","../index.ts"],"fileInfos":[{"version":"16934abaab7026ac114da441aabea1a0","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7","9443a7f109277ffaa79d893ed2549995","793cee405385076e27c24f409659dccd","09f69c6610266eaee1ac9e3e30df2c71","62bad718844246b8e17547f37bad6085",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},"abad6dd56cc8caf095c165df8124d237",{"version":"926204c28cd3d073865348473ae28d2e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f25e42c801b2cb3cf2b39792006a9beb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1708ea4d34dc37fadadc63ca01127e80","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2b056277dd138e8f5650fc04e20eaa8d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1da2c1f258970fd3cc91184f69e91a9d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8cf777fe00349b71ee9c4b6f3fe7fd19","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"74f96bc192530c9723f572bfff3d3078","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1df91c56b25955c56387426f378173c5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"38856f70edcd2115c355d96ec77cc09e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"de8700156c1275465bcd473c28b359aa","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d47cfdb6ede40518357bb5a4cd7cd9fb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6e5773860cd9e5b15e683113f642ab47","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"30ff5fe1682f7fcd629880476ca3c2e0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bf23d7d1b40b9015b694ddc2f011752f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2cc585d42e2c548f9f24a30a1989fd33","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"713906ce9d332d2242b7f05ed9304be3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0219894bfe5042c7e1aa2d22e4a91ed0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6009ffff7e43c93318804d2d28e37fe3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"03be89b227587594fbb50509fc1c2e45","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b30df52dc24740c0bad7c55c3511df7d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ab8d3c9b5ed5c2ab8f383607eef439f0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d950ec671d0a8e07f3c1a31e94abed86","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1abef2ace5eccb02d60dd73cd5a5ee4c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5f0a3044029d1cc081b5887eb4deb07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d57c697f1446940ec4bfe669c962e2c4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be41035d7b941482a1e1ae6a5c5dcca5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"10f7d9da7564f27f8ddf4a162b6da6d3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1d0520af549e0c3581f15173cc713ca1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d65083f97fd741cff028472563eddb79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"da7f24f00653ebac660ac1c0821ed33d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7cb5ae9e65516ea2235f0721f6aac43c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},"68565f078f6cbaa18bac7ac1aee706a4",{"version":"6df9988546b1b8e15cb137c4ed46c629","impliedNodeFormat":99},{"version":"04bfab517bef8ec649195900a112645a","signature":"0aa13ceea7e7c3f53c785d7ca09fc461","impliedNodeFormat":1},{"version":"d55806511032bffc887528ffc98bee9f","signature":"c2f6baeb9792f6582a4c97ed3f1041cf","impliedNodeFormat":1},{"version":"a7ffa0f207e5e558300b989f56e10ed8","signature":"dee26c2062ab4d0c96825cd9f06fc8ec","impliedNodeFormat":1},{"version":"30572a6c021fe02cf36ded539f81c4ab","signature":"86f3667a6b4bdf2ea2cb1b3d22824431","impliedNodeFormat":1},{"version":"d6444c005923a0e29b164735b3faf628","signature":"3ebc9c537c34634924dad5f75a5e826d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"eed8a4269d54d1b794fc93932726b39a","signature":"4c5307b1c87b22bd7862ce9245df2355","impliedNodeFormat":1},{"version":"4dad3ba63dfa4906aa5d59f3b088a12a","signature":"0c843f46bbfeb9f4f5e2f551ac701e71","impliedNodeFormat":1},{"version":"2a26f729ac58a50a4af8ae4cb949113b","signature":"56e1e5e440c94e1e1d7f6e87e79ad79a","impliedNodeFormat":1},{"version":"1a5c6baa45b220f4318f3265c59548eb","signature":"613a934507b0cfd0950cb8e6973dfedf","impliedNodeFormat":1},{"version":"485c2c85724ef7b3927b680aea8a91f9","signature":"bad057a4b4ea4af9b6014d316293750a","impliedNodeFormat":1},{"version":"b361021d3d18d13aac63b35d4b0ef1d1","signature":"e574772f7137c7acb41b9b4cf9df058d","impliedNodeFormat":1},{"version":"10bacfe190f9fe270633c42af70386a1","signature":"38aed49039f4cd461d25f012f97b8c39","impliedNodeFormat":1},{"version":"cc34701bb2e1462b45d017a6fe2f141f","signature":"719dfec5f3283ec85710adbba78e6365","impliedNodeFormat":1},{"version":"4824fb9728966ca9f9ce17b9ce75f05c","signature":"c2020050bac2e38d3fa0a6b493982137","impliedNodeFormat":1},{"version":"a1749f74fd525e58a163f183940e7e09","signature":"6aa3c11249f9aaa1ac65d937ead30969","impliedNodeFormat":1},{"version":"351814ccfa1ba58ef45ec89a4aeb404c","signature":"f98eec2170a99869483d3eca900d0cc0","impliedNodeFormat":1},{"version":"5184ac9b0d8991786893fe84aa78d6b9","signature":"b5ebd566a1965c6a14cd722344ce6f6e","impliedNodeFormat":1},{"version":"c7735481ae825eb6bbcfd4a9805ba6c1","signature":"a7d694b86b36ce7df89de40ffc9402aa","impliedNodeFormat":1},{"version":"908d0f661e9c957f8aa06d19d4ab330d","signature":"6417e5a1c83740dd726339c7dcb25e00","impliedNodeFormat":1},{"version":"7ac4e2073efabc8a9b3ffd50e858f616","signature":"a45a1270e3bec3c20dfc71dbd1f4c873","impliedNodeFormat":1},{"version":"9e48231dbfedcc7214ebef6ea6286a23","signature":"6fbd3fb27221371a80b8e5096ab64669","impliedNodeFormat":1},{"version":"dbf142eb5e53d886df2e7093c459d38a","signature":"819455b7d09613669008590152f72bfb","impliedNodeFormat":1},{"version":"458e81f3aa2be4dce8b9c74ea9501bbb","signature":"cb18508ff8bbf75a7e3ab6a4326d04bc","impliedNodeFormat":1},{"version":"27ff541c8e95725471b6b63deda1cee5","signature":"58b7f36019024977c58e8f9578061940","impliedNodeFormat":1},{"version":"5a1c99c1b8aee61fe81f2c24580f964a","signature":"f54113fe7e33138fa6bef35633d9c756","impliedNodeFormat":1},{"version":"640a86079ef069627d498d92042be3fd","signature":"9ebee2bd622814352f911c1123c777bb","impliedNodeFormat":1},{"version":"c61a48c85d6c125ca9883e4b050cdca7","signature":"1c1616eb4a9ee2509a326a00d2bb66f7","impliedNodeFormat":1},{"version":"422db4edf8c3ce6cf7e553ebd6fb9d67","signature":"9cb1145b2a3893442ee4af6d07a433a1","impliedNodeFormat":1},{"version":"f5389e83dd9ce8454cf4c529c3f27303","signature":"f39ebf82376bef22974827fb45fc2868","impliedNodeFormat":1},{"version":"aa02a24e6da8595f2ddf20291c42af9f","signature":"1fb32a9a54778e35701953fde7d6a644","impliedNodeFormat":1},{"version":"5565dbac2a69a59c1fcba503a6e50586","signature":"5faf589f6dca05637ace1b1e2b65a5d9","impliedNodeFormat":1},{"version":"8e1e86bc20e3c61f979e2567130c7842","signature":"b862c86ba994a1012909a9193bf8fccb","impliedNodeFormat":1},{"version":"11d4a6190e2dfd54e76be78ac56a83d2","signature":"c008349de6f254aab2ea421ab4467148","impliedNodeFormat":1},{"version":"153eb030a0af1896fa9f01694f42f98c","signature":"619e7562793b95efc8e4045b345c2958","impliedNodeFormat":1},{"version":"90afd3587a9a35670427e6961c843453","signature":"5c86fabce3450c64974c38377a4c7e78","impliedNodeFormat":1},{"version":"88e8ac668c482d4adea78be66563f1df","signature":"44105eab8a75458fcab12433d5d313c3","impliedNodeFormat":1},{"version":"975510ec28b104338b0200ad7da6681a","signature":"94ffea549c13e56a8cf4c04a811cbc75","impliedNodeFormat":1},{"version":"4233f8df71c1590dc418143794641f46","signature":"5c8de80b459b0cbf43397cfb4b8ff0d3","impliedNodeFormat":1},{"version":"77ef4441645eb9547648b763c0e124d6","signature":"d42cb94635f66e63be4724c41308e9c7","impliedNodeFormat":1},{"version":"22ac9c87f6f69a0d5e058def48f6029e","signature":"58604a62d80d6df338da00a0caafddb6","impliedNodeFormat":1}],"fileIdsList":[[93],[93,100],[92,96],[92],[92,95,96,97],[93,103],[92,93,95,98,102,104,105,106,124],[126],[92,96,102,129],[92,95,97,98,99],[92,95,96],[93,115],[115],[93,116],[115,116,117,118],[92,93,94,95,98,100,101,102,103,104,106,111,113,119,124,125,126,127,128,130],[92,107],[92,101,107],[92,104,107],[92,107,119],[92,107,111],[92,107,113],[92,106,107],[107,108,109,110,112,114,120,121,122,123],[90]],"options":{"allowJs":false,"assumeChangesOnlyAffectDirectDependencies":true,"checkJs":false,"composite":true,"emitDecoratorMetadata":true,"declaration":true,"declarationMap":true,"experimentalDecorators":true,"importHelpers":true,"jsx":4,"module":7,"newLine":2,"noFallthroughCasesInSwitch":true,"noImplicitAny":false,"noImplicitReturns":true,"outDir":"./","preserveConstEnums":true,"removeComments":true,"rootDir":"..","skipLibCheck":true,"strict":true,"strictNullChecks":true,"stripInternal":true,"sourceMap":true,"target":9,"allowSyntheticDefaultImports":true,"alwaysStrict":true,"esModuleInterop":true},"referencedMap":[[94,1],[101,2],[102,3],[95,4],[98,5],[104,6],[125,7],[127,8],[129,4],[111,2],[113,2],[106,1],[130,9],[100,10],[97,11],[117,12],[116,13],[115,2],[118,14],[119,15],[131,16],[108,17],[109,18],[110,19],[107,4],[121,20],[120,20],[122,20],[112,21],[114,22],[123,23],[124,24],[91,25],[93,4]],"latestChangedDtsFile":"./index.d.ts"}
1
+ {"version":"7.0.2","root":[[92,131]],"packageJsons":["../node_modules/tslib/modules/package.json","../node_modules/tslib/package.json","../package.json"],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.es2023.d.ts","lib.es2024.d.ts","lib.es2025.d.ts","lib.esnext.d.ts","lib.dom.d.ts","lib.dom.iterable.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.es2023.array.d.ts","lib.es2023.collection.d.ts","lib.es2023.intl.d.ts","lib.es2024.arraybuffer.d.ts","lib.es2024.collection.d.ts","lib.es2024.object.d.ts","lib.es2024.promise.d.ts","lib.es2024.regexp.d.ts","lib.es2024.sharedmemory.d.ts","lib.es2024.string.d.ts","lib.es2025.collection.d.ts","lib.es2025.float16.d.ts","lib.es2025.intl.d.ts","lib.es2025.iterator.d.ts","lib.es2025.promise.d.ts","lib.es2025.regexp.d.ts","lib.esnext.array.d.ts","lib.esnext.collection.d.ts","lib.esnext.date.d.ts","lib.esnext.decorators.d.ts","lib.esnext.disposable.d.ts","lib.esnext.error.d.ts","lib.esnext.intl.d.ts","lib.esnext.sharedmemory.d.ts","lib.esnext.temporal.d.ts","lib.esnext.typedarrays.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","../node_modules/tslib/tslib.d.ts","../node_modules/tslib/modules/index.d.ts","../Constructor.ts","../typeKey.ts","../ConceptAs.ts","../Field.ts","../reflection.ts","../fieldDecoratorMetadata.ts","../Fields.ts","../StandardFieldDecoratorContext.ts","../fieldDecorator.ts","../DateOnly.ts","../DerivedType.ts","../IEquatable.ts","../Guid.ts","../duplicateInstanceGuard.ts","../TimeOnly.ts","../TimeSpan.ts","../ValueMap.ts","../json/JsonConverter.ts","../json/DateJsonConverter.ts","../json/DateOnlyJsonConverter.ts","../json/GuidJsonConverter.ts","../json/TimeOnlyJsonConverter.ts","../json/TimeSpanJsonConverter.ts","../geospatial/Point.ts","../geospatial/LinearRing.ts","../geospatial/LineString.ts","../geospatial/Polygon.ts","../geospatial/index.ts","../json/PointJsonConverter.ts","../json/LineStringJsonConverter.ts","../json/PolygonJsonConverter.ts","../json/ValueMapJsonConverter.ts","../json/index.ts","../JsonSerializer.ts","../PropertyAccessor.ts","../PropertyAccessorDescriptor.ts","../PropertyPathResolverProxyHandler.ts","../StandardClassDecoratorContext.ts","../derivedTypeDecorator.ts","../index.ts"],"fileInfos":[{"version":"16934abaab7026ac114da441aabea1a0","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7","9443a7f109277ffaa79d893ed2549995","793cee405385076e27c24f409659dccd","09f69c6610266eaee1ac9e3e30df2c71","62bad718844246b8e17547f37bad6085",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},"abad6dd56cc8caf095c165df8124d237",{"version":"926204c28cd3d073865348473ae28d2e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f25e42c801b2cb3cf2b39792006a9beb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1708ea4d34dc37fadadc63ca01127e80","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2b056277dd138e8f5650fc04e20eaa8d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1da2c1f258970fd3cc91184f69e91a9d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8cf777fe00349b71ee9c4b6f3fe7fd19","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"74f96bc192530c9723f572bfff3d3078","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1df91c56b25955c56387426f378173c5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"38856f70edcd2115c355d96ec77cc09e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"de8700156c1275465bcd473c28b359aa","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d47cfdb6ede40518357bb5a4cd7cd9fb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6e5773860cd9e5b15e683113f642ab47","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"30ff5fe1682f7fcd629880476ca3c2e0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bf23d7d1b40b9015b694ddc2f011752f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2cc585d42e2c548f9f24a30a1989fd33","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"713906ce9d332d2242b7f05ed9304be3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0219894bfe5042c7e1aa2d22e4a91ed0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6009ffff7e43c93318804d2d28e37fe3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"03be89b227587594fbb50509fc1c2e45","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b30df52dc24740c0bad7c55c3511df7d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ab8d3c9b5ed5c2ab8f383607eef439f0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d950ec671d0a8e07f3c1a31e94abed86","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1abef2ace5eccb02d60dd73cd5a5ee4c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5f0a3044029d1cc081b5887eb4deb07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d57c697f1446940ec4bfe669c962e2c4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be41035d7b941482a1e1ae6a5c5dcca5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"10f7d9da7564f27f8ddf4a162b6da6d3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1d0520af549e0c3581f15173cc713ca1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d65083f97fd741cff028472563eddb79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"da7f24f00653ebac660ac1c0821ed33d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7cb5ae9e65516ea2235f0721f6aac43c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},"68565f078f6cbaa18bac7ac1aee706a4",{"version":"6df9988546b1b8e15cb137c4ed46c629","impliedNodeFormat":99},{"version":"04bfab517bef8ec649195900a112645a","signature":"0aa13ceea7e7c3f53c785d7ca09fc461","impliedNodeFormat":1},{"version":"e285e85b907a1ede9eb00700121ab05f","signature":"25b556595c58144e9f689861cf51007e","impliedNodeFormat":1},{"version":"a7ffa0f207e5e558300b989f56e10ed8","signature":"dee26c2062ab4d0c96825cd9f06fc8ec","impliedNodeFormat":1},{"version":"30572a6c021fe02cf36ded539f81c4ab","signature":"86f3667a6b4bdf2ea2cb1b3d22824431","impliedNodeFormat":1},{"version":"d6444c005923a0e29b164735b3faf628","signature":"3ebc9c537c34634924dad5f75a5e826d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"eed8a4269d54d1b794fc93932726b39a","signature":"4c5307b1c87b22bd7862ce9245df2355","impliedNodeFormat":1},{"version":"4dad3ba63dfa4906aa5d59f3b088a12a","signature":"0c843f46bbfeb9f4f5e2f551ac701e71","impliedNodeFormat":1},{"version":"2a26f729ac58a50a4af8ae4cb949113b","signature":"56e1e5e440c94e1e1d7f6e87e79ad79a","impliedNodeFormat":1},{"version":"1a5c6baa45b220f4318f3265c59548eb","signature":"613a934507b0cfd0950cb8e6973dfedf","impliedNodeFormat":1},{"version":"d731cbfd510ddb328444fb249d252cb3","signature":"85dfb47ef84f3c5ef0429c39b952f287","impliedNodeFormat":1},{"version":"b361021d3d18d13aac63b35d4b0ef1d1","signature":"e574772f7137c7acb41b9b4cf9df058d","impliedNodeFormat":1},{"version":"10bacfe190f9fe270633c42af70386a1","signature":"38aed49039f4cd461d25f012f97b8c39","impliedNodeFormat":1},{"version":"cc34701bb2e1462b45d017a6fe2f141f","signature":"719dfec5f3283ec85710adbba78e6365","impliedNodeFormat":1},{"version":"4824fb9728966ca9f9ce17b9ce75f05c","signature":"c2020050bac2e38d3fa0a6b493982137","impliedNodeFormat":1},{"version":"cc3fad0a0da5a4555abcefe6d35941bd","signature":"7799c653c55840f04bdc9fc37a12673a","impliedNodeFormat":1},{"version":"78411c67d0196e7be373294362edcc40","signature":"819455b7d09613669008590152f72bfb","impliedNodeFormat":1},{"version":"a1749f74fd525e58a163f183940e7e09","signature":"6aa3c11249f9aaa1ac65d937ead30969","impliedNodeFormat":1},{"version":"351814ccfa1ba58ef45ec89a4aeb404c","signature":"f98eec2170a99869483d3eca900d0cc0","impliedNodeFormat":1},{"version":"5184ac9b0d8991786893fe84aa78d6b9","signature":"b5ebd566a1965c6a14cd722344ce6f6e","impliedNodeFormat":1},{"version":"c7735481ae825eb6bbcfd4a9805ba6c1","signature":"a7d694b86b36ce7df89de40ffc9402aa","impliedNodeFormat":1},{"version":"908d0f661e9c957f8aa06d19d4ab330d","signature":"6417e5a1c83740dd726339c7dcb25e00","impliedNodeFormat":1},{"version":"9e48231dbfedcc7214ebef6ea6286a23","signature":"6fbd3fb27221371a80b8e5096ab64669","impliedNodeFormat":1},{"version":"458e81f3aa2be4dce8b9c74ea9501bbb","signature":"cb18508ff8bbf75a7e3ab6a4326d04bc","impliedNodeFormat":1},{"version":"27ff541c8e95725471b6b63deda1cee5","signature":"58b7f36019024977c58e8f9578061940","impliedNodeFormat":1},{"version":"5a1c99c1b8aee61fe81f2c24580f964a","signature":"f54113fe7e33138fa6bef35633d9c756","impliedNodeFormat":1},{"version":"640a86079ef069627d498d92042be3fd","signature":"9ebee2bd622814352f911c1123c777bb","impliedNodeFormat":1},{"version":"c61a48c85d6c125ca9883e4b050cdca7","signature":"1c1616eb4a9ee2509a326a00d2bb66f7","impliedNodeFormat":1},{"version":"422db4edf8c3ce6cf7e553ebd6fb9d67","signature":"9cb1145b2a3893442ee4af6d07a433a1","impliedNodeFormat":1},{"version":"f5389e83dd9ce8454cf4c529c3f27303","signature":"f39ebf82376bef22974827fb45fc2868","impliedNodeFormat":1},{"version":"aa02a24e6da8595f2ddf20291c42af9f","signature":"1fb32a9a54778e35701953fde7d6a644","impliedNodeFormat":1},{"version":"5565dbac2a69a59c1fcba503a6e50586","signature":"5faf589f6dca05637ace1b1e2b65a5d9","impliedNodeFormat":1},{"version":"8e1e86bc20e3c61f979e2567130c7842","signature":"b862c86ba994a1012909a9193bf8fccb","impliedNodeFormat":1},{"version":"11d4a6190e2dfd54e76be78ac56a83d2","signature":"c008349de6f254aab2ea421ab4467148","impliedNodeFormat":1},{"version":"edda0494f23091aa7c2faab44e0b62e3","signature":"619e7562793b95efc8e4045b345c2958","impliedNodeFormat":1},{"version":"90afd3587a9a35670427e6961c843453","signature":"5c86fabce3450c64974c38377a4c7e78","impliedNodeFormat":1},{"version":"88e8ac668c482d4adea78be66563f1df","signature":"44105eab8a75458fcab12433d5d313c3","impliedNodeFormat":1},{"version":"975510ec28b104338b0200ad7da6681a","signature":"94ffea549c13e56a8cf4c04a811cbc75","impliedNodeFormat":1},{"version":"4233f8df71c1590dc418143794641f46","signature":"5c8de80b459b0cbf43397cfb4b8ff0d3","impliedNodeFormat":1},{"version":"77ef4441645eb9547648b763c0e124d6","signature":"d42cb94635f66e63be4724c41308e9c7","impliedNodeFormat":1},{"version":"22ac9c87f6f69a0d5e058def48f6029e","signature":"58604a62d80d6df338da00a0caafddb6","impliedNodeFormat":1}],"fileIdsList":[[93],[93,100],[92,96],[92],[92,95,96,97],[93,103],[92,93,95,98,101,102,104,105,106,107,108,124],[126],[92,96,102,129],[92,95,97,98,99],[92,95,96],[93,115],[115],[93,116],[115,116,117,118],[92,93,94,95,98,100,101,102,103,104,106,107,108,119,124,125,126,127,128,130],[92,109],[92,101,109],[92,104,109],[92,109,119],[92,106,109],[92,107,109],[92,108,109],[109,110,111,112,113,114,120,121,122,123],[90]],"options":{"allowJs":false,"assumeChangesOnlyAffectDirectDependencies":true,"checkJs":false,"composite":true,"emitDecoratorMetadata":true,"declaration":true,"declarationMap":true,"experimentalDecorators":true,"importHelpers":true,"jsx":4,"module":7,"newLine":2,"noFallthroughCasesInSwitch":true,"noImplicitAny":false,"noImplicitReturns":true,"outDir":"./","preserveConstEnums":true,"removeComments":true,"rootDir":"..","skipLibCheck":true,"strict":true,"strictNullChecks":true,"stripInternal":true,"sourceMap":true,"target":9,"allowSyntheticDefaultImports":true,"alwaysStrict":true,"esModuleInterop":true},"referencedMap":[[94,1],[101,2],[102,3],[95,4],[98,5],[104,6],[125,7],[127,8],[129,4],[106,2],[107,2],[108,1],[130,9],[100,10],[97,11],[117,12],[116,13],[115,2],[118,14],[119,15],[131,16],[110,17],[111,18],[112,19],[109,4],[121,20],[120,20],[122,20],[113,21],[114,22],[123,23],[124,24],[91,25],[93,4]],"latestChangedDtsFile":"./index.d.ts"}
package/dist/typeKey.d.ts CHANGED
@@ -5,4 +5,7 @@ export declare const typeKeyOf: (type: Constructor | undefined) => string | unde
5
5
  export declare const conceptAsTypeKey = "ConceptAs";
6
6
  export declare const valueMapTypeKey = "ValueMap";
7
7
  export declare const guidTypeKey = "Guid";
8
+ export declare const dateOnlyTypeKey = "DateOnly";
9
+ export declare const timeOnlyTypeKey = "TimeOnly";
10
+ export declare const timeSpanTypeKey = "TimeSpan";
8
11
  //# sourceMappingURL=typeKey.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeKey.d.ts","sourceRoot":"","sources":["../typeKey.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAiB5C,eAAO,MAAM,OAAO,EAAE,OAAO,MAAmD,CAAC;AAcjF,eAAO,MAAM,eAAe,SAAU,WAAW,GAAG,SAAS,KAAG,MAAM,GAAG,SACiC,CAAC;AAW3G,eAAO,MAAM,SAAS,SAAU,WAAW,GAAG,SAAS,KAAG,MAAM,GAAG,SAChB,CAAC;AAGpD,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAG5C,eAAO,MAAM,eAAe,aAAa,CAAC;AAG1C,eAAO,MAAM,WAAW,SAAS,CAAC"}
1
+ {"version":3,"file":"typeKey.d.ts","sourceRoot":"","sources":["../typeKey.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAiB5C,eAAO,MAAM,OAAO,EAAE,OAAO,MAAmD,CAAC;AAcjF,eAAO,MAAM,eAAe,SAAU,WAAW,GAAG,SAAS,KAAG,MAAM,GAAG,SACiC,CAAC;AAW3G,eAAO,MAAM,SAAS,SAAU,WAAW,GAAG,SAAS,KAAG,MAAM,GAAG,SAChB,CAAC;AAGpD,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAG5C,eAAO,MAAM,eAAe,aAAa,CAAC;AAG1C,eAAO,MAAM,WAAW,SAAS,CAAC;AAGlC,eAAO,MAAM,eAAe,aAAa,CAAC;AAG1C,eAAO,MAAM,eAAe,aAAa,CAAC;AAG1C,eAAO,MAAM,eAAe,aAAa,CAAC"}
package/dist/typeKey.js CHANGED
@@ -4,4 +4,7 @@ export const typeKeyOf = (type) => type ? type[typeKey] : undefined;
4
4
  export const conceptAsTypeKey = 'ConceptAs';
5
5
  export const valueMapTypeKey = 'ValueMap';
6
6
  export const guidTypeKey = 'Guid';
7
+ export const dateOnlyTypeKey = 'DateOnly';
8
+ export const timeOnlyTypeKey = 'TimeOnly';
9
+ export const timeSpanTypeKey = 'TimeSpan';
7
10
  //# sourceMappingURL=typeKey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeKey.js","sourceRoot":"","sources":["../typeKey.ts"],"names":[],"mappings":"AAoBA,MAAM,CAAC,MAAM,OAAO,GAAkB,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;AAcjF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAA6B,EAAsB,EAAE,CACjF,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAE,IAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAW3G,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAA6B,EAAsB,EAAE,CAC3E,IAAI,CAAC,CAAC,CAAE,IAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAGpD,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAG5C,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;AAG1C,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"typeKey.js","sourceRoot":"","sources":["../typeKey.ts"],"names":[],"mappings":"AAoBA,MAAM,CAAC,MAAM,OAAO,GAAkB,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;AAcjF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAA6B,EAAsB,EAAE,CACjF,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAE,IAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAW3G,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAA6B,EAAsB,EAAE,CAC3E,IAAI,CAAC,CAAC,CAAE,IAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAGpD,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAG5C,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;AAG1C,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC;AAGlC,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;AAG1C,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;AAG1C,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC"}
@@ -0,0 +1,13 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { DateOnly } from '../DateOnly';
5
+
6
+ describe('when parsing an out of range calendar date', () => {
7
+ it('should reject a month above 12', () => (() => DateOnly.parse('2024-13-01')).should.throw('month 13 is out of range'));
8
+ it('should reject month zero', () => (() => DateOnly.parse('2024-00-10')).should.throw('month 0 is out of range'));
9
+ it('should reject a day beyond the month', () => (() => DateOnly.parse('2024-04-31')).should.throw('day 31 is out of range'));
10
+ it('should reject day zero', () => (() => DateOnly.parse('2024-01-00')).should.throw('day 0 is out of range'));
11
+ it('should reject both month and day out of range', () => (() => DateOnly.parse('2024-13-45')).should.throw('Invalid DateOnly'));
12
+ it('should reject year zero', () => (() => DateOnly.parse('0000-01-01')).should.throw('year 0 is out of range'));
13
+ });
@@ -0,0 +1,11 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { DateOnly } from '../DateOnly';
5
+
6
+ describe('when parsing february in leap and common years', () => {
7
+ it('should accept the 29th in a leap year', () => DateOnly.parse('2024-02-29').day.should.equal(29));
8
+ it('should accept the 29th in a year divisible by 400', () => DateOnly.parse('2000-02-29').day.should.equal(29));
9
+ it('should reject the 29th in a common year', () => (() => DateOnly.parse('2023-02-29')).should.throw('day 29 is out of range'));
10
+ it('should reject the 29th in a century year not divisible by 400', () => (() => DateOnly.parse('1900-02-29')).should.throw('day 29 is out of range'));
11
+ });
@@ -0,0 +1,19 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeSpan } from '../TimeSpan';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [TimeSpan, Number] })
11
+ byKey!: ValueMap<TimeSpan, number>;
12
+ }
13
+
14
+ describe('when deserializing a value map with negative TimeSpan keys as C# writes them', () => {
15
+ const result = JsonSerializer.deserialize(Totals, JSON.stringify({ byKey: { '-1.02:03:04.5000000': 7 } }));
16
+
17
+ it('should read the key as the same negative time span', () => [...result.byKey.entries()][0][0].toString().should.equal(TimeSpan.parse('-1.02:03:04.5').toString()));
18
+ it('should find the value by the equivalent key', () => result.byKey.get(TimeSpan.parse('-1.02:03:04.5'))!.should.equal(7));
19
+ });
@@ -0,0 +1,19 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeOnly } from '../TimeOnly';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [TimeOnly, Number] })
11
+ byKey!: ValueMap<TimeOnly, number>;
12
+ }
13
+
14
+ describe('when deserializing a value map with TimeOnly keys as C# writes them', () => {
15
+ const result = JsonSerializer.deserialize(Totals, JSON.stringify({ byKey: { '10:11:12.1230000': 7 } }));
16
+
17
+ it('should read the key as the same time', () => [...result.byKey.entries()][0][0].toString().should.equal(TimeOnly.parse('10:11:12.123').toString()));
18
+ it('should find the value by the equivalent key', () => result.byKey.get(TimeOnly.parse('10:11:12.123'))!.should.equal(7));
19
+ });
@@ -0,0 +1,19 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeSpan } from '../TimeSpan';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [TimeSpan, Number] })
11
+ byKey!: ValueMap<TimeSpan, number>;
12
+ }
13
+
14
+ describe('when deserializing a value map with whole second TimeSpan keys as C# writes them', () => {
15
+ const result = JsonSerializer.deserialize(Totals, JSON.stringify({ byKey: { '1.02:03:04': 7 } }));
16
+
17
+ it('should read the key as the same time span', () => [...result.byKey.entries()][0][0].toString().should.equal(TimeSpan.parse('1.02:03:04').toString()));
18
+ it('should find the value by the equivalent key', () => result.byKey.get(TimeSpan.parse('1.02:03:04'))!.should.equal(7));
19
+ });
@@ -0,0 +1,19 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { DateOnly } from '../DateOnly';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [DateOnly, Number] })
11
+ byKey!: ValueMap<DateOnly, number>;
12
+ }
13
+
14
+ describe('when deserializing a value map with legacy quoted DateOnly keys', () => {
15
+ const result = JsonSerializer.deserialize(Totals, JSON.stringify({ byKey: { '"2024-03-05"': 7 } }));
16
+
17
+ it('should read the key as the original value', () => [...result.byKey.entries()][0][0].toString().should.equal('2024-03-05'));
18
+ it('should find the value by the original key', () => result.byKey.get(DateOnly.parse('2024-03-05'))!.should.equal(7));
19
+ });
@@ -0,0 +1,19 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeOnly } from '../TimeOnly';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [TimeOnly, Number] })
11
+ byKey!: ValueMap<TimeOnly, number>;
12
+ }
13
+
14
+ describe('when deserializing a value map with legacy quoted TimeOnly keys', () => {
15
+ const result = JsonSerializer.deserialize(Totals, JSON.stringify({ byKey: { '"10:11:12.123"': 7 } }));
16
+
17
+ it('should read the key as the original value', () => [...result.byKey.entries()][0][0].toString().should.equal('10:11:12.123'));
18
+ it('should find the value by the original key', () => result.byKey.get(TimeOnly.parse('10:11:12.123'))!.should.equal(7));
19
+ });
@@ -0,0 +1,19 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeSpan } from '../TimeSpan';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [TimeSpan, Number] })
11
+ byKey!: ValueMap<TimeSpan, number>;
12
+ }
13
+
14
+ describe('when deserializing a value map with legacy quoted TimeSpan keys', () => {
15
+ const result = JsonSerializer.deserialize(Totals, JSON.stringify({ byKey: { '"1.02:03:04.5"': 7 } }));
16
+
17
+ it('should read the key as the original value', () => [...result.byKey.entries()][0][0].toString().should.equal('1.02:03:04.5'));
18
+ it('should find the value by the original key', () => result.byKey.get(TimeSpan.parse('1.02:03:04.5'))!.should.equal(7));
19
+ });
@@ -0,0 +1,20 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { DateOnly } from '../DateOnly';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [DateOnly, Number] })
11
+ byKey!: ValueMap<DateOnly, number>;
12
+ }
13
+
14
+ describe('when deserializing a value map with malformed DateOnly keys', () => {
15
+ const plain = () => JsonSerializer.deserialize(Totals, '{"byKey":{"not-valid":1}}');
16
+ const quoted = () => JsonSerializer.deserialize(Totals, JSON.stringify({ byKey: { '"not-valid"': 1 } }));
17
+
18
+ it('should reject a malformed plain key', () => plain.should.throw('not a valid DateOnly'));
19
+ it('should reject a malformed quoted key', () => quoted.should.throw('not a valid DateOnly'));
20
+ });
@@ -0,0 +1,20 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeOnly } from '../TimeOnly';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [TimeOnly, Number] })
11
+ byKey!: ValueMap<TimeOnly, number>;
12
+ }
13
+
14
+ describe('when deserializing a value map with malformed TimeOnly keys', () => {
15
+ const plain = () => JsonSerializer.deserialize(Totals, '{"byKey":{"not-valid":1}}');
16
+ const quoted = () => JsonSerializer.deserialize(Totals, JSON.stringify({ byKey: { '"not-valid"': 1 } }));
17
+
18
+ it('should reject a malformed plain key', () => plain.should.throw('not a valid TimeOnly'));
19
+ it('should reject a malformed quoted key', () => quoted.should.throw('not a valid TimeOnly'));
20
+ });
@@ -0,0 +1,20 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeSpan } from '../TimeSpan';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [TimeSpan, Number] })
11
+ byKey!: ValueMap<TimeSpan, number>;
12
+ }
13
+
14
+ describe('when deserializing a value map with malformed TimeSpan keys', () => {
15
+ const plain = () => JsonSerializer.deserialize(Totals, '{"byKey":{"not-valid":1}}');
16
+ const quoted = () => JsonSerializer.deserialize(Totals, JSON.stringify({ byKey: { '"not-valid"': 1 } }));
17
+
18
+ it('should reject a malformed plain key', () => plain.should.throw('not a valid TimeSpan'));
19
+ it('should reject a malformed quoted key', () => quoted.should.throw('not a valid TimeSpan'));
20
+ });
@@ -0,0 +1,19 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { DateOnly } from '../DateOnly';
5
+ import { TimeOnly } from '../TimeOnly';
6
+ import { TimeSpan } from '../TimeSpan';
7
+ import { JsonSerializer } from '../JsonSerializer';
8
+ import { ValueMap } from '../ValueMap';
9
+ import { field } from '../fieldDecorator';
10
+
11
+ class Dates { @field(ValueMap, { genericArguments: [DateOnly, Number] }) byKey!: ValueMap<DateOnly, number>; }
12
+ class Times { @field(ValueMap, { genericArguments: [TimeOnly, Number] }) byKey!: ValueMap<TimeOnly, number>; }
13
+ class Spans { @field(ValueMap, { genericArguments: [TimeSpan, Number] }) byKey!: ValueMap<TimeSpan, number>; }
14
+
15
+ describe('when deserializing a value map with out of range temporal keys', () => {
16
+ it('should reject a DateOnly key', () => (() => JsonSerializer.deserialize(Dates, '{"byKey":{"2024-13-45":1}}')).should.throw('not a valid DateOnly'));
17
+ it('should reject a TimeOnly key', () => (() => JsonSerializer.deserialize(Times, '{"byKey":{"25:99:00":1}}')).should.throw('not a valid TimeOnly'));
18
+ it('should reject a TimeSpan key', () => (() => JsonSerializer.deserialize(Spans, '{"byKey":{"00:60:00":1}}')).should.throw('not a valid TimeSpan'));
19
+ });
@@ -0,0 +1,20 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { DateOnly } from '../DateOnly';
5
+ import { TimeOnly } from '../TimeOnly';
6
+ import { TimeSpan } from '../TimeSpan';
7
+ import { JsonSerializer } from '../JsonSerializer';
8
+ import { field } from '../fieldDecorator';
9
+
10
+ class Holder {
11
+ @field(DateOnly) date!: DateOnly;
12
+ @field(TimeOnly) time!: TimeOnly;
13
+ @field(TimeSpan) span!: TimeSpan;
14
+ }
15
+
16
+ describe('when deserializing out of range temporal values', () => {
17
+ it('should reject a DateOnly value', () => (() => JsonSerializer.deserialize(Holder, '{"date":"2024-13-45"}')).should.throw('Invalid DateOnly'));
18
+ it('should reject a TimeOnly value', () => (() => JsonSerializer.deserialize(Holder, '{"time":"25:99:00"}')).should.throw('Invalid TimeOnly'));
19
+ it('should reject a TimeSpan value', () => (() => JsonSerializer.deserialize(Holder, '{"span":"00:60:00"}')).should.throw('Invalid TimeSpan'));
20
+ });
@@ -0,0 +1,26 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { DateOnly } from '../DateOnly';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [DateOnly, Number] })
11
+ byKey!: ValueMap<DateOnly, number>;
12
+ }
13
+
14
+ describe('when round tripping a value map with DateOnly keys', () => {
15
+ const key = DateOnly.parse('2024-03-05');
16
+ const totals = new Totals();
17
+ totals.byKey = new ValueMap<DateOnly, number>().set(key, 42);
18
+
19
+ const written = JsonSerializer.serialize(totals);
20
+ const read = JsonSerializer.deserialize(Totals, written);
21
+
22
+ it('should write the key as the plain string', () => written.should.equal('{"byKey":{"2024-03-05":42}}'));
23
+ it('should read the key back as a DateOnly', () => [...read.byKey.entries()][0][0].should.be.instanceof(DateOnly));
24
+ it('should read the key back as the original value', () => [...read.byKey.entries()][0][0].toString().should.equal('2024-03-05'));
25
+ it('should find the value by the original key', () => read.byKey.get(key)!.should.equal(42));
26
+ });
@@ -0,0 +1,26 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeOnly } from '../TimeOnly';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [TimeOnly, Number] })
11
+ byKey!: ValueMap<TimeOnly, number>;
12
+ }
13
+
14
+ describe('when round tripping a value map with TimeOnly keys', () => {
15
+ const key = TimeOnly.parse('10:11:12.123');
16
+ const totals = new Totals();
17
+ totals.byKey = new ValueMap<TimeOnly, number>().set(key, 42);
18
+
19
+ const written = JsonSerializer.serialize(totals);
20
+ const read = JsonSerializer.deserialize(Totals, written);
21
+
22
+ it('should write the key as the plain string', () => written.should.equal('{"byKey":{"10:11:12.123":42}}'));
23
+ it('should read the key back as a TimeOnly', () => [...read.byKey.entries()][0][0].should.be.instanceof(TimeOnly));
24
+ it('should read the key back as the original value', () => [...read.byKey.entries()][0][0].toString().should.equal('10:11:12.123'));
25
+ it('should find the value by the original key', () => read.byKey.get(key)!.should.equal(42));
26
+ });
@@ -0,0 +1,20 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeOnly } from '../TimeOnly';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [TimeOnly, Number] })
11
+ byKey!: ValueMap<TimeOnly, number>;
12
+ }
13
+
14
+ describe('when round tripping a value map with time only keys differing below a millisecond', () => {
15
+ const result = JsonSerializer.deserialize(Totals, '{"byKey":{"10:11:12.1234567":1,"10:11:12.1239999":2}}');
16
+
17
+ it('should keep both entries', () => [...result.byKey.entries()].length.should.equal(2));
18
+ it('should find the first value', () => result.byKey.get(TimeOnly.parse('10:11:12.1234567'))!.should.equal(1));
19
+ it('should find the second value', () => result.byKey.get(TimeOnly.parse('10:11:12.1239999'))!.should.equal(2));
20
+ });
@@ -0,0 +1,26 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeSpan } from '../TimeSpan';
5
+ import { JsonSerializer } from '../JsonSerializer';
6
+ import { ValueMap } from '../ValueMap';
7
+ import { field } from '../fieldDecorator';
8
+
9
+ class Totals {
10
+ @field(ValueMap, { genericArguments: [TimeSpan, Number] })
11
+ byKey!: ValueMap<TimeSpan, number>;
12
+ }
13
+
14
+ describe('when round tripping a value map with TimeSpan keys', () => {
15
+ const key = TimeSpan.parse('1.02:03:04.5');
16
+ const totals = new Totals();
17
+ totals.byKey = new ValueMap<TimeSpan, number>().set(key, 42);
18
+
19
+ const written = JsonSerializer.serialize(totals);
20
+ const read = JsonSerializer.deserialize(Totals, written);
21
+
22
+ it('should write the key as the plain string', () => written.should.equal('{"byKey":{"1.02:03:04.5":42}}'));
23
+ it('should read the key back as a TimeSpan', () => [...read.byKey.entries()][0][0].should.be.instanceof(TimeSpan));
24
+ it('should read the key back as the original value', () => [...read.byKey.entries()][0][0].toString().should.equal('1.02:03:04.5'));
25
+ it('should find the value by the original key', () => read.byKey.get(key)!.should.equal(42));
26
+ });
@@ -0,0 +1,11 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeOnly } from '../TimeOnly';
5
+
6
+ describe('when creating with out of range sub millisecond ticks', () => {
7
+ it('should reject ticks above 9999', () => (() => TimeOnly.from(1, 2, 3, 4, 10000)).should.throw('subMillisecondTicks 10000 is out of range'));
8
+ it('should reject negative ticks', () => (() => TimeOnly.from(1, 2, 3, 4, -1)).should.throw('subMillisecondTicks -1 is out of range'));
9
+ it('should reject fractional ticks', () => (() => TimeOnly.from(1, 2, 3, 4, 1.5)).should.throw('out of range'));
10
+ it('should accept the largest value', () => TimeOnly.from(1, 2, 3, 4, 9999).subMillisecondTicks.should.equal(9999));
11
+ });
@@ -0,0 +1,11 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeOnly } from '../TimeOnly';
5
+
6
+ describe('when parsing an out of range time of day', () => {
7
+ it('should reject an hour above 23', () => (() => TimeOnly.parse('24:00:00')).should.throw('hour 24 is out of range'));
8
+ it('should reject a minute above 59', () => (() => TimeOnly.parse('10:60:00')).should.throw('minute 60 is out of range'));
9
+ it('should reject a second above 59', () => (() => TimeOnly.parse('10:00:60')).should.throw('second 60 is out of range'));
10
+ it('should reject every component out of range', () => (() => TimeOnly.parse('25:99:00')).should.throw('Invalid TimeOnly'));
11
+ });
@@ -0,0 +1,10 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TimeOnly } from '../TimeOnly';
5
+
6
+ describe('when parsing the last moment of the day', () => {
7
+ const parsed = TimeOnly.parse('23:59:59.9999999');
8
+
9
+ it('should keep the full fraction', () => parsed.toString().should.equal('23:59:59.9999999'));
10
+ });
@@ -4,9 +4,9 @@
4
4
  import { TimeOnly } from '../TimeOnly';
5
5
 
6
6
  /**
7
- * The server omits the seconds and the fraction when they are zero, and writes up to seven fractional digits where
8
- * JavaScript holds three. Every one of those shapes has to parse, and a value has to survive a parse followed by a
9
- * render without moving.
7
+ * The server omits the seconds and the fraction when they are zero, and writes up to seven fractional digits.
8
+ * Every one of those shapes has to parse, and a value has to survive a parse followed by a render without
9
+ * moving.
10
10
  */
11
11
  describe('when parsing the shapes the server sends', () => {
12
12
  const withoutSeconds = TimeOnly.parse('14:30');
@@ -16,9 +16,9 @@ describe('when parsing the shapes the server sends', () => {
16
16
  it('should default the seconds when they are omitted', () => withoutSeconds.second.should.equal(0));
17
17
  it('should render omitted seconds explicitly', () => withoutSeconds.toString().should.equal('14:30:00'));
18
18
 
19
- // Truncated rather than rounded, so a parse followed by a render never moves the value forward.
20
- it('should truncate the fraction to milliseconds', () => withFraction.millisecond.should.equal(123));
21
- it('should render the fraction it kept', () => withFraction.toString().should.equal('14:30:45.123'));
19
+ it('should keep the milliseconds of the fraction', () => withFraction.millisecond.should.equal(123));
20
+ it('should keep the ticks below the millisecond', () => withFraction.subMillisecondTicks.should.equal(4567));
21
+ it('should render the full fraction', () => withFraction.toString().should.equal('14:30:45.1234567'));
22
22
 
23
23
  it('should parse midnight', () => midnight.toString().should.equal('00:00:00'));
24
24
  });