-
Notifications
You must be signed in to change notification settings - Fork 8.3k
增强 util-formatDate ts 类型提示 #6886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
WalkthroughThe date utility module now accepts optional time parameters in Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant formatDate
rect rgb(200, 220, 255)
Note over Caller,formatDate: New Flow
Caller->>formatDate: formatDate(time?, format)
alt time is provided
formatDate->>formatDate: Validate input
alt Validation passes
formatDate->>Caller: Return formatted string
else Validation fails
formatDate->>Caller: Throw error
end
else time is undefined
formatDate->>Caller: Return stringified time (nullish coalescing)
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
commit 信息被我搞乱了,但真正更新的文件只有一个。所以合并时请选择 "Squash and Merge"
Type of change
Please delete options that are not relevant.
pnpm-lock.yamlunless you introduce a new test example.Checklist
pnpm run docs:devcommand.pnpm test.feat:,fix:,perf:,docs:, orchore:.Summary by CodeRabbit