Fix: [for cherry-picking] Added a dedicated Date constructor capability

Closed
QO
2mo ago
+49-4

Fixed Findings

  • Track Date core constructor capability separately

Automated fix from agentic review of https://github.com/metaphorics/bamTiScript/pull/201

Qodo Logo

Summary by Sourcery

Separate the ES2015 Date constructor capability from the broader ES2015 library to preserve accurate Date typings under scoped library configurations.

Bug Fixes:

  • Track the ES2015 Date constructor capability independently so Date(value) receives the correct parameter types when only the core library is enabled.

Enhancements:

  • Extend library target and name resolution to include the dedicated ES2015 Date core capability.

Tests:

  • Add coverage for Date constructor typing with the ES5 and ES2015 core libraries enabled.

Summary by cubic

Tracks the ES2015 Date constructor capability separately from the broader ES2015 library so Date(value) gets correct parameter types when only the core library is enabled.