Conversation
|
@lazerg Thank you for submitting this PR! This is a live comment that I will keep updated. 1 package in this PRCode ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. InactiveThis PR has been inactive for 16 days — please try to get reviewers! Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 75463,
"author": "lazerg",
"headCommitOid": "4384e33ce74b221408471891f18caa6f6d2d88cb",
"mergeBaseOid": "d0ba4d27bbba786ca23dca88cf8878867a83ccb8",
"lastPushDate": "2026-08-31T11:59:21.000Z",
"lastActivityDate": "2026-09-14T17:34:55.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"tooManyCommits": false,
"tooManyReviews": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "luxon",
"version": "3.7",
"kind": "edit",
"files": [
{
"path": "types/luxon/src/luxon.d.ts",
"kind": "definition"
},
{
"path": "types/luxon/test/luxon-tests.module.ts",
"kind": "test"
}
],
"owners": [
"carsonf",
"peterblazejewicz"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [],
"mainBotCommentID": 5478008923,
"ciResult": "pass"
} |
|
🔔 @CarsonF @peterblazejewicz — please review this PR in the next few days. Be sure to explicitly select |
|
Re-ping @CarsonF, @peterblazejewicz: This PR has been out for over a week, yet I haven't seen any reviews. Could someone please give it some attention? Thanks! |
|
Sorry for the delay here. I can see how export type Valid = true;
// or
export type ValidDateTime = DateTime<true>;FYI if you opted in to throw on invalid, you wouldn't have to worry about the validity conditions. import { Settings } from 'luxon';
Settings.throwOnInvalid = true;
declare module 'luxon' {
interface TSSettings {
throwOnInvalid: true;
}
}
// DateTime == DateTime<true> |
|
You're right about
Happy to drop |
|
Are you subclassing? what are some signatures that use these types? |
Valid,InvalidandDefaultValidityare the type arguments of the exportedDateTime<IsValid>,Interval<IsValid>andDuration<IsValid>generics, but they live insrc/_util.d.ts, which the barrel never re-exported. Until 3.7.0 you could still reach them throughluxon/src/_util; theexportsmap added in #73292 closed that path, so there is now no way to name them.This re-exports the five validity helpers from
src/luxon.d.ts. Doing it that way keeps theexportsmap (and thearethetypeswrongfix) untouched, and doesn't expose the rest of the internals the way adding"./src/*"would.Fixes #75462
Please fill in this template.
pnpm test <package to test>.If changing an existing definition:
package.json.