@nubjs/nub-linux-x64 0.0.7 → 0.0.9
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/bin/nub +0 -0
- package/package.json +1 -1
- package/runtime/addons/nub-native.node +0 -0
- package/runtime/node_modules/@js-temporal/polyfill/CHANGELOG.md +453 -0
- package/runtime/node_modules/@js-temporal/polyfill/LICENSE +13 -0
- package/runtime/node_modules/@js-temporal/polyfill/README.md +90 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs +2 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs.map +1 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js +2 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js.map +1 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js +2 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js.map +1 -0
- package/runtime/node_modules/@js-temporal/polyfill/index.d.cts +1215 -0
- package/runtime/node_modules/@js-temporal/polyfill/index.d.ts +1215 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/assert.ts +8 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/bigintmath.ts +39 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/calendar.ts +2424 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/debug.ts +7 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/duration.ts +438 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/durationformat.d.ts +93 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/ecmascript.ts +4973 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/index.ts +34 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/init.ts +43 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/instant.ts +138 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/internaltypes.d.ts +242 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/intl.ts +758 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/intrinsicclass.ts +162 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/legacydate.ts +17 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/math.ts +96 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/now.ts +48 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaindate.ts +212 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaindatetime.ts +274 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plainmonthday.ts +110 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaintime.ts +154 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plainyearmonth.ts +157 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/regex.ts +59 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/slots.ts +341 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/temporal.ts +10 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/timeduration.ts +149 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/zoneddatetime.ts +492 -0
- package/runtime/node_modules/@js-temporal/polyfill/package.json +143 -0
- package/runtime/node_modules/@oxc-project/runtime/CHANGELOG.md +88 -0
- package/runtime/node_modules/@oxc-project/runtime/LICENSE +22 -0
- package/runtime/node_modules/@oxc-project/runtime/README.md +5 -0
- package/runtime/node_modules/@oxc-project/runtime/package.json +1066 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/AwaitValue.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecoratedDescriptor.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs.js +236 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203.js +184 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203R.js +191 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2301.js +222 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2305.js +133 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2311.js +124 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayLikeToArray.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithHoles.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithoutHoles.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertClassBrand.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertThisInitialized.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js +24 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js +45 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncToGenerator.js +26 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/callSuper.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkInRHS.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkPrivateRedeclaration.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorDestructureSet.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorGet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCallCheck.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticAccess.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticFieldDescriptor.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classExtractFieldDescriptor.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classNameTDZError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldDestructureSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet2.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldInitSpec.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseBase.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseKey.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet2.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateGetter.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodGet.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodInitSpec.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodSet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateSetter.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldDestructureSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecGet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodGet.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodSet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/construct.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createClass.js +13 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelper.js +50 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelperLoose.js +19 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createSuper.js +16 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorate.js +23 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateMetadata.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateParam.js +11 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defaults.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineAccessor.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineEnumerableProperties.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/dispose.js +28 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/AwaitValue.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/OverloadYield.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecoratedDescriptor.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs.js +236 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203.js +184 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203R.js +191 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2301.js +222 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2305.js +133 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2311.js +124 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayLikeToArray.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithHoles.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithoutHoles.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertClassBrand.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertThisInitialized.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncGeneratorDelegate.js +24 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncIterator.js +45 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncToGenerator.js +26 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/awaitAsyncGenerator.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/callSuper.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkInRHS.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkPrivateRedeclaration.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorDestructureSet.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorGet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCallCheck.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticAccess.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classExtractFieldDescriptor.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classNameTDZError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldDestructureSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet2.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldInitSpec.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseBase.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseKey.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet2.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateGetter.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodGet.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodInitSpec.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodSet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateSetter.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldDestructureSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecGet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodGet.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodSet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/construct.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createClass.js +13 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelper.js +50 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelperLoose.js +19 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createSuper.js +16 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorate.js +21 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateMetadata.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateParam.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defaults.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineAccessor.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineEnumerableProperties.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineProperty.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/dispose.js +28 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/extends.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/get.js +11 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/getPrototypeOf.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/identity.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/importDeferProxy.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inherits.js +14 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inheritsLoose.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerDefineProperty.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerWarningHelper.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/instanceof.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireDefault.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireWildcard.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeFunction.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeReflectConstruct.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArray.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArrayLimit.js +28 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/jsx.js +22 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/maybeArrayLike.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/newArrowCheck.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableRest.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableSpread.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nullishReceiverError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectDestructuringEmpty.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread.js +14 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread2.js +23 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutProperties.js +13 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutPropertiesLoose.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/package.json +3 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/possibleConstructorReturn.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/readOnlyError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/regeneratorRuntime.js +304 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/set.js +22 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setFunctionName.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setPrototypeOf.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/skipFirstGeneratorNext.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/slicedToArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropBase.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropGet.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropSet.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteral.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteralLoose.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/tdz.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalRef.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalUndefined.js +2 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toConsumableArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPrimitive.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPropertyKey.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toSetter.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/typeof.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/unsupportedIterableToArray.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/using.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/usingCtx.js +59 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapAsyncGenerator.js +69 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapNativeSuper.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapRegExp.js +51 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/writeOnlyError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/extends.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/get.js +11 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/getPrototypeOf.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/identity.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/importDeferProxy.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/inherits.js +14 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/inheritsLoose.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerDefineProperty.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerWarningHelper.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/instanceof.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireDefault.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireWildcard.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeFunction.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeReflectConstruct.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArray.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArrayLimit.js +28 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/jsx.js +22 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/maybeArrayLike.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/newArrowCheck.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableRest.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableSpread.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nullishReceiverError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectDestructuringEmpty.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread.js +14 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js +23 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js +13 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/possibleConstructorReturn.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/readOnlyError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/regeneratorRuntime.js +304 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/set.js +22 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/setFunctionName.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/setPrototypeOf.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/skipFirstGeneratorNext.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/slicedToArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropBase.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropGet.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropSet.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteral.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteralLoose.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/tdz.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalRef.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalUndefined.js +2 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toConsumableArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toSetter.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/typeof.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/unsupportedIterableToArray.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/using.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js +59 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js +69 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapNativeSuper.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapRegExp.js +51 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/writeOnlyError.js +4 -0
- package/runtime/node_modules/@oxc-project/types/LICENSE +22 -0
- package/runtime/node_modules/@oxc-project/types/README.md +3 -0
- package/runtime/node_modules/@oxc-project/types/package.json +26 -0
- package/runtime/node_modules/@oxc-project/types/types.d.ts +1912 -0
- package/runtime/node_modules/@petamoriken/float16/LICENSE +21 -0
- package/runtime/node_modules/@petamoriken/float16/README.md +413 -0
- package/runtime/node_modules/@petamoriken/float16/browser/float16.js +1340 -0
- package/runtime/node_modules/@petamoriken/float16/browser/float16.mjs +1325 -0
- package/runtime/node_modules/@petamoriken/float16/index.d.ts +546 -0
- package/runtime/node_modules/@petamoriken/float16/index.v5.6.d.ts +546 -0
- package/runtime/node_modules/@petamoriken/float16/index.v5.7.d.ts +555 -0
- package/runtime/node_modules/@petamoriken/float16/inspect/node.cjs +25 -0
- package/runtime/node_modules/@petamoriken/float16/inspect/node.mjs +23 -0
- package/runtime/node_modules/@petamoriken/float16/lib/DataView.cjs +16 -0
- package/runtime/node_modules/@petamoriken/float16/lib/Float16Array.cjs +690 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/arrayIterator.cjs +52 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/brand.cjs +27 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/converter.cjs +111 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/is.cjs +78 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/messages.cjs +18 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/primordials.cjs +150 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/spec.cjs +84 -0
- package/runtime/node_modules/@petamoriken/float16/lib/f16round.cjs +10 -0
- package/runtime/node_modules/@petamoriken/float16/lib/index.cjs +16 -0
- package/runtime/node_modules/@petamoriken/float16/lib/isTypedArray.cjs +11 -0
- package/runtime/node_modules/@petamoriken/float16/package.json +115 -0
- package/runtime/node_modules/@petamoriken/float16/src/DataView.mjs +35 -0
- package/runtime/node_modules/@petamoriken/float16/src/Float16Array.mjs +1194 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/arrayIterator.mjs +86 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/brand.mjs +31 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/converter.mjs +173 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/is.mjs +151 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/messages.mjs +22 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/primordials.mjs +254 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/spec.mjs +137 -0
- package/runtime/node_modules/@petamoriken/float16/src/f16round.mjs +10 -0
- package/runtime/node_modules/@petamoriken/float16/src/index.mjs +7 -0
- package/runtime/node_modules/@petamoriken/float16/src/isTypedArray.mjs +10 -0
- package/runtime/node_modules/get-tsconfig/LICENSE +21 -0
- package/runtime/node_modules/get-tsconfig/README.md +268 -0
- package/runtime/node_modules/get-tsconfig/dist/index.cjs +7 -0
- package/runtime/node_modules/get-tsconfig/dist/index.d.cts +2116 -0
- package/runtime/node_modules/get-tsconfig/dist/index.d.mts +2116 -0
- package/runtime/node_modules/get-tsconfig/dist/index.mjs +7 -0
- package/runtime/node_modules/get-tsconfig/package.json +46 -0
- package/runtime/node_modules/jsbi/LICENSE +176 -0
- package/runtime/node_modules/jsbi/README.md +173 -0
- package/runtime/node_modules/jsbi/dist/jsbi-cjs.js +2 -0
- package/runtime/node_modules/jsbi/dist/jsbi-cjs.js.map +1 -0
- package/runtime/node_modules/jsbi/dist/jsbi-umd.js +2 -0
- package/runtime/node_modules/jsbi/dist/jsbi-umd.js.map +1 -0
- package/runtime/node_modules/jsbi/dist/jsbi.mjs +2 -0
- package/runtime/node_modules/jsbi/dist/jsbi.mjs.map +1 -0
- package/runtime/node_modules/jsbi/jsbi.d.ts +43 -0
- package/runtime/node_modules/jsbi/package.json +35 -0
- package/runtime/node_modules/oxc-parser/LICENSE +22 -0
- package/runtime/node_modules/oxc-parser/README.md +167 -0
- package/runtime/node_modules/oxc-parser/package.json +153 -0
- package/runtime/node_modules/oxc-parser/src-js/bindings.js +601 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/constants.js +105 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/js.js +5862 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/js_range.js +6403 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/ts.js +6154 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/ts_range.js +6723 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/lazy/constructors.js +13875 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/lazy/type_ids.js +191 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/lazy/walk.js +5810 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/keys.js +220 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/type_ids.js +177 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts +387 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/walk.js +2455 -0
- package/runtime/node_modules/oxc-parser/src-js/index.d.ts +312 -0
- package/runtime/node_modules/oxc-parser/src-js/index.js +108 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/common.js +301 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/eager.js +255 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/lazy-common.js +11 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/lazy.js +162 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/node-array.js +365 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/supported.js +52 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/visitor.js +127 -0
- package/runtime/node_modules/oxc-parser/src-js/visit/index.js +41 -0
- package/runtime/node_modules/oxc-parser/src-js/visit/visitor.js +405 -0
- package/runtime/node_modules/oxc-parser/src-js/wasm.js +13 -0
- package/runtime/node_modules/oxc-parser/src-js/webcontainer-fallback.cjs +21 -0
- package/runtime/node_modules/oxc-parser/src-js/wrap.js +57 -0
- package/runtime/node_modules/oxc-transform/LICENSE +22 -0
- package/runtime/node_modules/oxc-transform/README.md +84 -0
- package/runtime/node_modules/oxc-transform/browser.js +1 -0
- package/runtime/node_modules/oxc-transform/index.d.ts +658 -0
- package/runtime/node_modules/oxc-transform/index.js +598 -0
- package/runtime/node_modules/oxc-transform/package.json +114 -0
- package/runtime/node_modules/oxc-transform/webcontainer-fallback.cjs +21 -0
- package/runtime/node_modules/resolve-pkg-maps/LICENSE +21 -0
- package/runtime/node_modules/resolve-pkg-maps/README.md +216 -0
- package/runtime/node_modules/resolve-pkg-maps/dist/index.cjs +1 -0
- package/runtime/node_modules/resolve-pkg-maps/dist/index.d.cts +11 -0
- package/runtime/node_modules/resolve-pkg-maps/dist/index.d.mts +11 -0
- package/runtime/node_modules/resolve-pkg-maps/dist/index.mjs +1 -0
- package/runtime/node_modules/resolve-pkg-maps/package.json +42 -0
- package/runtime/node_modules/urlpattern-polyfill/LICENSE +19 -0
- package/runtime/node_modules/urlpattern-polyfill/README.md +242 -0
- package/runtime/node_modules/urlpattern-polyfill/dist/index.d.ts +9 -0
- package/runtime/node_modules/urlpattern-polyfill/dist/types.d.ts +49 -0
- package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.cjs +1 -0
- package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.js +1 -0
- package/runtime/node_modules/urlpattern-polyfill/index.cjs +7 -0
- package/runtime/node_modules/urlpattern-polyfill/index.js +7 -0
- package/runtime/node_modules/urlpattern-polyfill/package.json +149 -0
- package/runtime/version.mjs +1 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import type JSBI from 'jsbi';
|
|
2
|
+
import type { Temporal } from '..';
|
|
3
|
+
import type { CalendarImpl } from './calendar';
|
|
4
|
+
import type { BuiltinCalendarId } from './internaltypes';
|
|
5
|
+
import type { DateTimeFormatImpl } from './intl';
|
|
6
|
+
|
|
7
|
+
import { DEBUG } from './debug';
|
|
8
|
+
import { GetSlot, ORIGINAL } from './slots';
|
|
9
|
+
|
|
10
|
+
type OmitConstructor<T> = { [P in keyof T as T[P] extends new (...args: any[]) => any ? P : never]: T[P] };
|
|
11
|
+
|
|
12
|
+
type TemporalIntrinsics = {
|
|
13
|
+
['Intl.DateTimeFormat']: typeof globalThis.Intl.DateTimeFormat;
|
|
14
|
+
['Temporal.Duration']: typeof Temporal.Duration;
|
|
15
|
+
['Temporal.Instant']: OmitConstructor<Temporal.Instant> &
|
|
16
|
+
(new (epochNanoseconds: JSBI) => Temporal.Instant) & { prototype: typeof Temporal.Instant.prototype };
|
|
17
|
+
['Temporal.PlainDate']: typeof Temporal.PlainDate;
|
|
18
|
+
['Temporal.PlainDateTime']: typeof Temporal.PlainDateTime;
|
|
19
|
+
['Temporal.PlainMonthDay']: typeof Temporal.PlainMonthDay;
|
|
20
|
+
['Temporal.PlainTime']: typeof Temporal.PlainTime;
|
|
21
|
+
['Temporal.PlainYearMonth']: typeof Temporal.PlainYearMonth;
|
|
22
|
+
['Temporal.ZonedDateTime']: OmitConstructor<Temporal.ZonedDateTime> &
|
|
23
|
+
(new (epochNanoseconds: JSBI, timeZone: string, calendar?: string) => Temporal.ZonedDateTime) & {
|
|
24
|
+
prototype: typeof Temporal.ZonedDateTime.prototype;
|
|
25
|
+
from: typeof Temporal.ZonedDateTime.from;
|
|
26
|
+
compare: typeof Temporal.ZonedDateTime.compare;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type TemporalIntrinsicRegistrations = {
|
|
30
|
+
[key in keyof TemporalIntrinsics]: TemporalIntrinsics[key];
|
|
31
|
+
};
|
|
32
|
+
type TemporalIntrinsicPrototypeRegistrations = {
|
|
33
|
+
[key in keyof TemporalIntrinsics as `${key}.prototype`]: TemporalIntrinsics[key]['prototype'];
|
|
34
|
+
};
|
|
35
|
+
type TemporalIntrinsicRegisteredKeys = {
|
|
36
|
+
[key in keyof TemporalIntrinsicRegistrations as `%${key}%`]: TemporalIntrinsicRegistrations[key];
|
|
37
|
+
};
|
|
38
|
+
type TemporalIntrinsicPrototypeRegisteredKeys = {
|
|
39
|
+
[key in keyof TemporalIntrinsicPrototypeRegistrations as `%${key}%`]: TemporalIntrinsicPrototypeRegistrations[key];
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
type OtherIntrinsics = {
|
|
43
|
+
calendarImpl: (id: BuiltinCalendarId) => CalendarImpl;
|
|
44
|
+
};
|
|
45
|
+
type OtherIntrinsicKeys = { [key in keyof OtherIntrinsics as `%${key}%`]: OtherIntrinsics[key] };
|
|
46
|
+
|
|
47
|
+
const INTRINSICS = {} as TemporalIntrinsicRegisteredKeys &
|
|
48
|
+
TemporalIntrinsicPrototypeRegisteredKeys &
|
|
49
|
+
OtherIntrinsicKeys;
|
|
50
|
+
|
|
51
|
+
type StylizeOption = (value: unknown, type: 'number' | 'special') => string;
|
|
52
|
+
|
|
53
|
+
type customFormatFunction<T> = (
|
|
54
|
+
this: T & { _repr_: string }, // _repr_ is present if DEBUG
|
|
55
|
+
depth: number,
|
|
56
|
+
options: { stylize: StylizeOption },
|
|
57
|
+
inspect: (object: T, options?: { depth: number; stylize: StylizeOption }) => string
|
|
58
|
+
) => string;
|
|
59
|
+
const customUtilInspectFormatters: Partial<{
|
|
60
|
+
[key in keyof TemporalIntrinsicRegistrations]: customFormatFunction<
|
|
61
|
+
InstanceType<TemporalIntrinsicRegistrations[key]>
|
|
62
|
+
>;
|
|
63
|
+
}> = {
|
|
64
|
+
['Intl.DateTimeFormat'](depth, options, inspect) {
|
|
65
|
+
return inspect(GetSlot(this as DateTimeFormatImpl, ORIGINAL), { depth, ...options });
|
|
66
|
+
},
|
|
67
|
+
['Temporal.Duration'](depth, options) {
|
|
68
|
+
const descr = options.stylize(this._repr_, 'special');
|
|
69
|
+
if (depth < 1) return descr;
|
|
70
|
+
const entries: string[] = [];
|
|
71
|
+
const props = [
|
|
72
|
+
'years',
|
|
73
|
+
'months',
|
|
74
|
+
'weeks',
|
|
75
|
+
'days',
|
|
76
|
+
'hours',
|
|
77
|
+
'minutes',
|
|
78
|
+
'seconds',
|
|
79
|
+
'milliseconds',
|
|
80
|
+
'microseconds',
|
|
81
|
+
'nanoseconds'
|
|
82
|
+
] as const;
|
|
83
|
+
for (let i = 0; i < props.length; i++) {
|
|
84
|
+
const prop = props[i];
|
|
85
|
+
if (this[prop] !== 0) {
|
|
86
|
+
entries.push(` ${prop}: ${options.stylize(this[prop], 'number')}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return descr + ' {\n' + entries.join(',\n') + '\n}';
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
type InspectFormatterOptions = { stylize: (str: string, styleType: string) => string };
|
|
94
|
+
function defaultUtilInspectFormatter(this: any, depth: number, options: InspectFormatterOptions) {
|
|
95
|
+
return options.stylize(this._repr_, 'special');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function MakeIntrinsicClass(
|
|
99
|
+
Class: TemporalIntrinsicRegistrations[typeof name],
|
|
100
|
+
name: keyof TemporalIntrinsicRegistrations
|
|
101
|
+
) {
|
|
102
|
+
Object.defineProperty(Class.prototype, Symbol.toStringTag, {
|
|
103
|
+
value: name,
|
|
104
|
+
writable: false,
|
|
105
|
+
enumerable: false,
|
|
106
|
+
configurable: true
|
|
107
|
+
});
|
|
108
|
+
if (DEBUG) {
|
|
109
|
+
Object.defineProperty(Class.prototype, Symbol.for('nodejs.util.inspect.custom'), {
|
|
110
|
+
value: customUtilInspectFormatters[name] || defaultUtilInspectFormatter,
|
|
111
|
+
writable: false,
|
|
112
|
+
enumerable: false,
|
|
113
|
+
configurable: true
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
const staticNames = Object.getOwnPropertyNames(Class);
|
|
117
|
+
for (let i = 0; i < staticNames.length; i++) {
|
|
118
|
+
const prop = staticNames[i];
|
|
119
|
+
// we know that `prop` is present, so the descriptor is never undefined
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
121
|
+
const desc = Object.getOwnPropertyDescriptor(Class, prop)!;
|
|
122
|
+
if (!desc.configurable || !desc.enumerable) continue;
|
|
123
|
+
desc.enumerable = false;
|
|
124
|
+
Object.defineProperty(Class, prop, desc);
|
|
125
|
+
}
|
|
126
|
+
const protoNames = Object.getOwnPropertyNames(Class.prototype);
|
|
127
|
+
for (let i = 0; i < protoNames.length; i++) {
|
|
128
|
+
const prop = protoNames[i];
|
|
129
|
+
// we know that `prop` is present, so the descriptor is never undefined
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
131
|
+
const desc = Object.getOwnPropertyDescriptor(Class.prototype, prop)!;
|
|
132
|
+
if (!desc.configurable || !desc.enumerable) continue;
|
|
133
|
+
desc.enumerable = false;
|
|
134
|
+
Object.defineProperty(Class.prototype, prop, desc);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
DefineIntrinsic(name, Class);
|
|
138
|
+
DefineIntrinsic(`${name}.prototype`, Class.prototype);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
type IntrinsicDefinitionKeys =
|
|
142
|
+
| keyof TemporalIntrinsicRegistrations
|
|
143
|
+
| keyof TemporalIntrinsicPrototypeRegistrations
|
|
144
|
+
| keyof OtherIntrinsics;
|
|
145
|
+
export function DefineIntrinsic<KeyT extends keyof TemporalIntrinsicRegistrations>(
|
|
146
|
+
name: KeyT,
|
|
147
|
+
value: TemporalIntrinsicRegistrations[KeyT]
|
|
148
|
+
): void;
|
|
149
|
+
export function DefineIntrinsic<KeyT extends keyof TemporalIntrinsicPrototypeRegistrations>(
|
|
150
|
+
name: KeyT,
|
|
151
|
+
value: TemporalIntrinsicPrototypeRegistrations[KeyT]
|
|
152
|
+
): void;
|
|
153
|
+
export function DefineIntrinsic<KeyT extends keyof OtherIntrinsics>(name: KeyT, value: OtherIntrinsics[KeyT]): void;
|
|
154
|
+
export function DefineIntrinsic<KeyT>(name: KeyT, value: never): void;
|
|
155
|
+
export function DefineIntrinsic<KeyT extends IntrinsicDefinitionKeys>(name: KeyT, value: unknown): void {
|
|
156
|
+
const key: `%${IntrinsicDefinitionKeys}%` = `%${name}%`;
|
|
157
|
+
if (INTRINSICS[key] !== undefined) throw new Error(`intrinsic ${name} already exists`);
|
|
158
|
+
INTRINSICS[key] = value;
|
|
159
|
+
}
|
|
160
|
+
export function GetIntrinsic<KeyT extends keyof typeof INTRINSICS>(intrinsic: KeyT): (typeof INTRINSICS)[KeyT] {
|
|
161
|
+
return INTRINSICS[intrinsic];
|
|
162
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as ES from './ecmascript';
|
|
2
|
+
|
|
3
|
+
// By default, a plain function can be called as a constructor. A method such as
|
|
4
|
+
// Date.prototype.toTemporalInstant should not be able to. We could check
|
|
5
|
+
// new.target in the body of toTemporalInstant, but that is not sufficient for
|
|
6
|
+
// preventing construction when passing it as the newTarget parameter of
|
|
7
|
+
// Reflect.construct. So we create it as a method of an otherwise unused class,
|
|
8
|
+
// and monkeypatch it onto Date.prototype.
|
|
9
|
+
|
|
10
|
+
class LegacyDateImpl {
|
|
11
|
+
toTemporalInstant(this: Date) {
|
|
12
|
+
const epochNanoseconds = ES.epochMsToNs(Date.prototype.valueOf.call(this));
|
|
13
|
+
return ES.CreateTemporalInstant(epochNanoseconds);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const toTemporalInstant = LegacyDateImpl.prototype.toTemporalInstant;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type JSBI from 'jsbi';
|
|
2
|
+
import type { Temporal } from '..';
|
|
3
|
+
|
|
4
|
+
// Computes trunc(x / 10**p) and x % 10**p, returning { div, mod }, with
|
|
5
|
+
// precision loss only once in the quotient, by string manipulation. If the
|
|
6
|
+
// quotient and remainder are safe integers, then they are exact. x must be an
|
|
7
|
+
// integer. p must be a non-negative integer. Both div and mod have the sign of
|
|
8
|
+
// x.
|
|
9
|
+
export function TruncatingDivModByPowerOf10(xParam: number, p: number) {
|
|
10
|
+
let x = xParam;
|
|
11
|
+
if (x === 0) return { div: x, mod: x }; // preserves signed zero
|
|
12
|
+
|
|
13
|
+
const sign = Math.sign(x);
|
|
14
|
+
x = Math.abs(x);
|
|
15
|
+
|
|
16
|
+
const xDigits = Math.trunc(1 + Math.log10(x));
|
|
17
|
+
if (p >= xDigits) return { div: sign * 0, mod: sign * x };
|
|
18
|
+
if (p === 0) return { div: sign * x, mod: sign * 0 };
|
|
19
|
+
|
|
20
|
+
// would perform nearest rounding if x was not an integer:
|
|
21
|
+
const xStr = x.toPrecision(xDigits);
|
|
22
|
+
const div = sign * Number.parseInt(xStr.slice(0, xDigits - p), 10);
|
|
23
|
+
const mod = sign * Number.parseInt(xStr.slice(xDigits - p), 10);
|
|
24
|
+
|
|
25
|
+
return { div, mod };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Computes x * 10**p + z with precision loss only at the end, by string
|
|
29
|
+
// manipulation. If the result is a safe integer, then it is exact. x must be
|
|
30
|
+
// an integer. p must be a non-negative integer. z must have the same sign as
|
|
31
|
+
// x and be less than 10**p.
|
|
32
|
+
export function FMAPowerOf10(xParam: number, p: number, zParam: number) {
|
|
33
|
+
let x = xParam;
|
|
34
|
+
let z = zParam;
|
|
35
|
+
if (x === 0) return z;
|
|
36
|
+
|
|
37
|
+
const sign = Math.sign(x) || Math.sign(z);
|
|
38
|
+
x = Math.abs(x);
|
|
39
|
+
z = Math.abs(z);
|
|
40
|
+
|
|
41
|
+
const xStr = x.toPrecision(Math.trunc(1 + Math.log10(x)));
|
|
42
|
+
|
|
43
|
+
if (z === 0) return sign * Number.parseInt(xStr + '0'.repeat(p), 10);
|
|
44
|
+
|
|
45
|
+
const zStr = z.toPrecision(Math.trunc(1 + Math.log10(z)));
|
|
46
|
+
|
|
47
|
+
const resStr = xStr + zStr.padStart(p, '0');
|
|
48
|
+
return sign * Number.parseInt(resStr, 10);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
type UnsignedRoundingMode = 'half-even' | 'half-infinity' | 'half-zero' | 'infinity' | 'zero';
|
|
52
|
+
|
|
53
|
+
export function GetUnsignedRoundingMode(
|
|
54
|
+
mode: Temporal.RoundingMode,
|
|
55
|
+
sign: 'positive' | 'negative'
|
|
56
|
+
): UnsignedRoundingMode {
|
|
57
|
+
const isNegative = sign === 'negative';
|
|
58
|
+
switch (mode) {
|
|
59
|
+
case 'ceil':
|
|
60
|
+
return isNegative ? 'zero' : 'infinity';
|
|
61
|
+
case 'floor':
|
|
62
|
+
return isNegative ? 'infinity' : 'zero';
|
|
63
|
+
case 'expand':
|
|
64
|
+
return 'infinity';
|
|
65
|
+
case 'trunc':
|
|
66
|
+
return 'zero';
|
|
67
|
+
case 'halfCeil':
|
|
68
|
+
return isNegative ? 'half-zero' : 'half-infinity';
|
|
69
|
+
case 'halfFloor':
|
|
70
|
+
return isNegative ? 'half-infinity' : 'half-zero';
|
|
71
|
+
case 'halfExpand':
|
|
72
|
+
return 'half-infinity';
|
|
73
|
+
case 'halfTrunc':
|
|
74
|
+
return 'half-zero';
|
|
75
|
+
case 'halfEven':
|
|
76
|
+
return 'half-even';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Omits first step from spec algorithm so that it can be used both for
|
|
81
|
+
// RoundNumberToIncrement and RoundTimeDurationToIncrement
|
|
82
|
+
export function ApplyUnsignedRoundingMode<T extends number | JSBI>(
|
|
83
|
+
r1: T,
|
|
84
|
+
r2: T,
|
|
85
|
+
cmp: -1 | 0 | 1,
|
|
86
|
+
evenCardinality: boolean,
|
|
87
|
+
unsignedRoundingMode: UnsignedRoundingMode
|
|
88
|
+
) {
|
|
89
|
+
if (unsignedRoundingMode === 'zero') return r1;
|
|
90
|
+
if (unsignedRoundingMode === 'infinity') return r2;
|
|
91
|
+
if (cmp < 0) return r1;
|
|
92
|
+
if (cmp > 0) return r2;
|
|
93
|
+
if (unsignedRoundingMode === 'half-zero') return r1;
|
|
94
|
+
if (unsignedRoundingMode === 'half-infinity') return r2;
|
|
95
|
+
return evenCardinality ? r1 : r2;
|
|
96
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as ES from './ecmascript';
|
|
2
|
+
import type { Temporal } from '..';
|
|
3
|
+
|
|
4
|
+
function SystemDateTime(timeZone: string) {
|
|
5
|
+
return ES.GetISODateTimeFor(timeZone, ES.SystemUTCEpochNanoSeconds());
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const instant: (typeof Temporal.Now)['instant'] = () => {
|
|
9
|
+
return ES.CreateTemporalInstant(ES.SystemUTCEpochNanoSeconds());
|
|
10
|
+
};
|
|
11
|
+
const plainDateTimeISO: (typeof Temporal.Now)['plainDateTimeISO'] = (temporalTimeZoneLike = ES.DefaultTimeZone()) => {
|
|
12
|
+
const timeZone = ES.ToTemporalTimeZoneIdentifier(temporalTimeZoneLike);
|
|
13
|
+
const isoDateTime = SystemDateTime(timeZone);
|
|
14
|
+
return ES.CreateTemporalDateTime(isoDateTime, 'iso8601');
|
|
15
|
+
};
|
|
16
|
+
const zonedDateTimeISO: (typeof Temporal.Now)['zonedDateTimeISO'] = (temporalTimeZoneLike = ES.DefaultTimeZone()) => {
|
|
17
|
+
const timeZone = ES.ToTemporalTimeZoneIdentifier(temporalTimeZoneLike);
|
|
18
|
+
return ES.CreateTemporalZonedDateTime(ES.SystemUTCEpochNanoSeconds(), timeZone, 'iso8601');
|
|
19
|
+
};
|
|
20
|
+
const plainDateISO: (typeof Temporal.Now)['plainDateISO'] = (temporalTimeZoneLike = ES.DefaultTimeZone()) => {
|
|
21
|
+
const timeZone = ES.ToTemporalTimeZoneIdentifier(temporalTimeZoneLike);
|
|
22
|
+
const isoDateTime = SystemDateTime(timeZone);
|
|
23
|
+
return ES.CreateTemporalDate(isoDateTime.isoDate, 'iso8601');
|
|
24
|
+
};
|
|
25
|
+
const plainTimeISO: (typeof Temporal.Now)['plainTimeISO'] = (temporalTimeZoneLike = ES.DefaultTimeZone()) => {
|
|
26
|
+
const timeZone = ES.ToTemporalTimeZoneIdentifier(temporalTimeZoneLike);
|
|
27
|
+
const isoDateTime = SystemDateTime(timeZone);
|
|
28
|
+
return ES.CreateTemporalTime(isoDateTime.time);
|
|
29
|
+
};
|
|
30
|
+
const timeZoneId: (typeof Temporal.Now)['timeZoneId'] = () => {
|
|
31
|
+
return ES.DefaultTimeZone();
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const Now: typeof Temporal.Now = {
|
|
35
|
+
instant,
|
|
36
|
+
plainDateTimeISO,
|
|
37
|
+
plainDateISO,
|
|
38
|
+
plainTimeISO,
|
|
39
|
+
timeZoneId,
|
|
40
|
+
zonedDateTimeISO,
|
|
41
|
+
[Symbol.toStringTag]: 'Temporal.Now'
|
|
42
|
+
};
|
|
43
|
+
Object.defineProperty(Now, Symbol.toStringTag, {
|
|
44
|
+
value: 'Temporal.Now',
|
|
45
|
+
writable: false,
|
|
46
|
+
enumerable: false,
|
|
47
|
+
configurable: true
|
|
48
|
+
});
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import * as ES from './ecmascript';
|
|
2
|
+
import { MakeIntrinsicClass } from './intrinsicclass';
|
|
3
|
+
import { CALENDAR, GetSlot, ISO_DATE, TIME } from './slots';
|
|
4
|
+
import type { Temporal } from '..';
|
|
5
|
+
import { DateTimeFormat } from './intl';
|
|
6
|
+
import type { CalendarDateRecord, PlainDateParams as Params, PlainDateReturn as Return } from './internaltypes';
|
|
7
|
+
|
|
8
|
+
export class PlainDate implements Temporal.PlainDate {
|
|
9
|
+
constructor(
|
|
10
|
+
isoYear: Params['constructor'][0],
|
|
11
|
+
isoMonth: Params['constructor'][1],
|
|
12
|
+
isoDay: Params['constructor'][2],
|
|
13
|
+
calendarParam: Params['constructor'][3] = 'iso8601'
|
|
14
|
+
) {
|
|
15
|
+
const year = ES.ToIntegerWithTruncation(isoYear);
|
|
16
|
+
const month = ES.ToIntegerWithTruncation(isoMonth);
|
|
17
|
+
const day = ES.ToIntegerWithTruncation(isoDay);
|
|
18
|
+
const calendar = ES.CanonicalizeCalendar(calendarParam === undefined ? 'iso8601' : ES.RequireString(calendarParam));
|
|
19
|
+
ES.RejectISODate(year, month, day);
|
|
20
|
+
|
|
21
|
+
ES.CreateTemporalDateSlots(this, { year, month, day }, calendar);
|
|
22
|
+
}
|
|
23
|
+
get calendarId(): Return['calendarId'] {
|
|
24
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
25
|
+
return GetSlot(this, CALENDAR);
|
|
26
|
+
}
|
|
27
|
+
get era(): Return['era'] {
|
|
28
|
+
return getCalendarProperty(this, 'era');
|
|
29
|
+
}
|
|
30
|
+
get eraYear(): Return['eraYear'] {
|
|
31
|
+
return getCalendarProperty(this, 'eraYear');
|
|
32
|
+
}
|
|
33
|
+
get year(): Return['year'] {
|
|
34
|
+
return getCalendarProperty(this, 'year');
|
|
35
|
+
}
|
|
36
|
+
get month(): Return['month'] {
|
|
37
|
+
return getCalendarProperty(this, 'month');
|
|
38
|
+
}
|
|
39
|
+
get monthCode(): Return['monthCode'] {
|
|
40
|
+
return getCalendarProperty(this, 'monthCode');
|
|
41
|
+
}
|
|
42
|
+
get day(): Return['day'] {
|
|
43
|
+
return getCalendarProperty(this, 'day');
|
|
44
|
+
}
|
|
45
|
+
get dayOfWeek(): Return['dayOfWeek'] {
|
|
46
|
+
return getCalendarProperty(this, 'dayOfWeek');
|
|
47
|
+
}
|
|
48
|
+
get dayOfYear(): Return['dayOfYear'] {
|
|
49
|
+
return getCalendarProperty(this, 'dayOfYear');
|
|
50
|
+
}
|
|
51
|
+
get weekOfYear(): Return['weekOfYear'] {
|
|
52
|
+
return getCalendarProperty(this, 'weekOfYear')?.week;
|
|
53
|
+
}
|
|
54
|
+
get yearOfWeek(): Return['yearOfWeek'] {
|
|
55
|
+
return getCalendarProperty(this, 'weekOfYear')?.year;
|
|
56
|
+
}
|
|
57
|
+
get daysInWeek(): Return['daysInWeek'] {
|
|
58
|
+
return getCalendarProperty(this, 'daysInWeek');
|
|
59
|
+
}
|
|
60
|
+
get daysInMonth(): Return['daysInMonth'] {
|
|
61
|
+
return getCalendarProperty(this, 'daysInMonth');
|
|
62
|
+
}
|
|
63
|
+
get daysInYear(): Return['daysInYear'] {
|
|
64
|
+
return getCalendarProperty(this, 'daysInYear');
|
|
65
|
+
}
|
|
66
|
+
get monthsInYear(): Return['monthsInYear'] {
|
|
67
|
+
return getCalendarProperty(this, 'monthsInYear');
|
|
68
|
+
}
|
|
69
|
+
get inLeapYear(): Return['inLeapYear'] {
|
|
70
|
+
return getCalendarProperty(this, 'inLeapYear');
|
|
71
|
+
}
|
|
72
|
+
with(temporalDateLike: Params['with'][0], options: Params['with'][1] = undefined): Return['with'] {
|
|
73
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
74
|
+
if (!ES.IsObject(temporalDateLike)) {
|
|
75
|
+
throw new TypeError('invalid argument');
|
|
76
|
+
}
|
|
77
|
+
ES.RejectTemporalLikeObject(temporalDateLike);
|
|
78
|
+
|
|
79
|
+
const calendar = GetSlot(this, CALENDAR);
|
|
80
|
+
let fields = ES.ISODateToFields(calendar, GetSlot(this, ISO_DATE));
|
|
81
|
+
const partialDate = ES.PrepareCalendarFields(
|
|
82
|
+
calendar,
|
|
83
|
+
temporalDateLike,
|
|
84
|
+
['year', 'month', 'monthCode', 'day'],
|
|
85
|
+
[],
|
|
86
|
+
'partial'
|
|
87
|
+
);
|
|
88
|
+
fields = ES.CalendarMergeFields(calendar, fields, partialDate);
|
|
89
|
+
|
|
90
|
+
const overflow = ES.GetTemporalOverflowOption(ES.GetOptionsObject(options));
|
|
91
|
+
const isoDate = ES.CalendarDateFromFields(calendar, fields, overflow);
|
|
92
|
+
return ES.CreateTemporalDate(isoDate, calendar);
|
|
93
|
+
}
|
|
94
|
+
withCalendar(calendarParam: Params['withCalendar'][0]): Return['withCalendar'] {
|
|
95
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
96
|
+
const calendar = ES.ToTemporalCalendarIdentifier(calendarParam);
|
|
97
|
+
return ES.CreateTemporalDate(GetSlot(this, ISO_DATE), calendar);
|
|
98
|
+
}
|
|
99
|
+
add(temporalDurationLike: Params['add'][0], options: Params['add'][1] = undefined): Return['add'] {
|
|
100
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
101
|
+
return ES.AddDurationToDate('add', this, temporalDurationLike, options);
|
|
102
|
+
}
|
|
103
|
+
subtract(
|
|
104
|
+
temporalDurationLike: Params['subtract'][0],
|
|
105
|
+
options: Params['subtract'][1] = undefined
|
|
106
|
+
): Return['subtract'] {
|
|
107
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
108
|
+
return ES.AddDurationToDate('subtract', this, temporalDurationLike, options);
|
|
109
|
+
}
|
|
110
|
+
until(other: Params['until'][0], options: Params['until'][1] = undefined): Return['until'] {
|
|
111
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
112
|
+
return ES.DifferenceTemporalPlainDate('until', this, other, options);
|
|
113
|
+
}
|
|
114
|
+
since(other: Params['since'][0], options: Params['since'][1] = undefined): Return['since'] {
|
|
115
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
116
|
+
return ES.DifferenceTemporalPlainDate('since', this, other, options);
|
|
117
|
+
}
|
|
118
|
+
equals(otherParam: Params['equals'][0]): Return['equals'] {
|
|
119
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
120
|
+
const other = ES.ToTemporalDate(otherParam);
|
|
121
|
+
if (ES.CompareISODate(GetSlot(this, ISO_DATE), GetSlot(other, ISO_DATE)) !== 0) return false;
|
|
122
|
+
return ES.CalendarEquals(GetSlot(this, CALENDAR), GetSlot(other, CALENDAR));
|
|
123
|
+
}
|
|
124
|
+
toString(options: Params['toString'][0] = undefined): string {
|
|
125
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
126
|
+
const resolvedOptions = ES.GetOptionsObject(options);
|
|
127
|
+
const showCalendar = ES.GetTemporalShowCalendarNameOption(resolvedOptions);
|
|
128
|
+
return ES.TemporalDateToString(this, showCalendar);
|
|
129
|
+
}
|
|
130
|
+
toJSON(): Return['toJSON'] {
|
|
131
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
132
|
+
return ES.TemporalDateToString(this);
|
|
133
|
+
}
|
|
134
|
+
toLocaleString(
|
|
135
|
+
locales: Params['toLocaleString'][0] = undefined,
|
|
136
|
+
options: Params['toLocaleString'][1] = undefined
|
|
137
|
+
): string {
|
|
138
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
139
|
+
return new DateTimeFormat(locales, options).format(this);
|
|
140
|
+
}
|
|
141
|
+
valueOf(): never {
|
|
142
|
+
ES.ValueOfThrows('PlainDate');
|
|
143
|
+
}
|
|
144
|
+
toPlainDateTime(temporalTime: Params['toPlainDateTime'][0] = undefined): Return['toPlainDateTime'] {
|
|
145
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
146
|
+
const time = ES.ToTimeRecordOrMidnight(temporalTime);
|
|
147
|
+
const isoDateTime = ES.CombineISODateAndTimeRecord(GetSlot(this, ISO_DATE), time);
|
|
148
|
+
return ES.CreateTemporalDateTime(isoDateTime, GetSlot(this, CALENDAR));
|
|
149
|
+
}
|
|
150
|
+
toZonedDateTime(item: Params['toZonedDateTime'][0]): Return['toZonedDateTime'] {
|
|
151
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
152
|
+
|
|
153
|
+
let timeZone, temporalTime;
|
|
154
|
+
if (ES.IsObject(item)) {
|
|
155
|
+
const timeZoneLike = item.timeZone;
|
|
156
|
+
if (timeZoneLike === undefined) {
|
|
157
|
+
timeZone = ES.ToTemporalTimeZoneIdentifier(item);
|
|
158
|
+
} else {
|
|
159
|
+
timeZone = ES.ToTemporalTimeZoneIdentifier(timeZoneLike);
|
|
160
|
+
temporalTime = item.plainTime;
|
|
161
|
+
}
|
|
162
|
+
} else {
|
|
163
|
+
timeZone = ES.ToTemporalTimeZoneIdentifier(item);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const isoDate = GetSlot(this, ISO_DATE);
|
|
167
|
+
let epochNs;
|
|
168
|
+
if (temporalTime === undefined) {
|
|
169
|
+
epochNs = ES.GetStartOfDay(timeZone, isoDate);
|
|
170
|
+
} else {
|
|
171
|
+
temporalTime = ES.ToTemporalTime(temporalTime);
|
|
172
|
+
const isoDateTime = ES.CombineISODateAndTimeRecord(isoDate, GetSlot(temporalTime, TIME));
|
|
173
|
+
epochNs = ES.GetEpochNanosecondsFor(timeZone, isoDateTime, 'compatible');
|
|
174
|
+
}
|
|
175
|
+
return ES.CreateTemporalZonedDateTime(epochNs, timeZone, GetSlot(this, CALENDAR));
|
|
176
|
+
}
|
|
177
|
+
toPlainYearMonth(): Return['toPlainYearMonth'] {
|
|
178
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
179
|
+
const calendar = GetSlot(this, CALENDAR);
|
|
180
|
+
const fields = ES.ISODateToFields(calendar, GetSlot(this, ISO_DATE));
|
|
181
|
+
const isoDate = ES.CalendarYearMonthFromFields(calendar, fields, 'constrain');
|
|
182
|
+
return ES.CreateTemporalYearMonth(isoDate, calendar);
|
|
183
|
+
}
|
|
184
|
+
toPlainMonthDay(): Return['toPlainMonthDay'] {
|
|
185
|
+
ES.CheckReceiver(this, ES.IsTemporalDate);
|
|
186
|
+
const calendar = GetSlot(this, CALENDAR);
|
|
187
|
+
const fields = ES.ISODateToFields(calendar, GetSlot(this, ISO_DATE));
|
|
188
|
+
const isoDate = ES.CalendarMonthDayFromFields(calendar, fields, 'constrain');
|
|
189
|
+
return ES.CreateTemporalMonthDay(isoDate, calendar);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
static from(item: Params['from'][0], options: Params['from'][1] = undefined): Return['from'] {
|
|
193
|
+
return ES.ToTemporalDate(item, options);
|
|
194
|
+
}
|
|
195
|
+
static compare(oneParam: Params['compare'][0], twoParam: Params['compare'][1]): Return['compare'] {
|
|
196
|
+
const one = ES.ToTemporalDate(oneParam);
|
|
197
|
+
const two = ES.ToTemporalDate(twoParam);
|
|
198
|
+
return ES.CompareISODate(GetSlot(one, ISO_DATE), GetSlot(two, ISO_DATE));
|
|
199
|
+
}
|
|
200
|
+
[Symbol.toStringTag]!: 'Temporal.PlainDate';
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
MakeIntrinsicClass(PlainDate, 'Temporal.PlainDate');
|
|
204
|
+
|
|
205
|
+
function getCalendarProperty<P extends keyof CalendarDateRecord>(
|
|
206
|
+
date: Temporal.PlainDate,
|
|
207
|
+
prop: P
|
|
208
|
+
): CalendarDateRecord[P] {
|
|
209
|
+
ES.CheckReceiver(date, ES.IsTemporalDate);
|
|
210
|
+
const isoDate = GetSlot(date, ISO_DATE);
|
|
211
|
+
return ES.calendarImplForObj(date).isoToDate(isoDate, { [prop]: true })[prop];
|
|
212
|
+
}
|