Skip to content
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

type(affix): optimize InternalAffixProps type #43578

Closed
wants to merge 4 commits into from

Conversation

thinkasany
Copy link
Contributor

@thinkasany thinkasany commented Jul 15, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

修改的是内部的props,不影响对外暴露的类型,然后这边类型添加的是参考test文件中的
image

📝 Changelog

Language Changelog
🇺🇸 English optimize InternalAffixProps type
🇨🇳 Chinese 优化类型

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

🤖 Generated by Copilot at 1233ec5

Enhance testing of updatePosition method in Affix component. Add onTestUpdatePosition prop and remove type assertion in components/affix/index.tsx.

🔍 Walkthrough

🤖 Generated by Copilot at 1233ec5

  • Add a new prop onTestUpdatePosition to InternalAffixProps to test updatePosition method (link)
  • Remove unnecessary type assertion as any from onTestUpdatePosition prop in InternalAffix component (link)

@stackblitz
Copy link

stackblitz bot commented Jul 15, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 15, 2023

@codecov
Copy link

codecov bot commented Jul 15, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (94541ed) 100.00% compared to head (c5e9162) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #43578   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          657       657           
  Lines        11048     11048           
  Branches      2991      2991           
=========================================
  Hits         11048     11048           
Impacted Files Coverage Δ
components/affix/index.tsx 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -43,6 +43,7 @@ export interface AffixProps {

interface InternalAffixProps extends AffixProps {
affixPrefixCls: string;
onTestUpdatePosition?: () => void;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个不需要,后面重构会删掉

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thinkasany thinkasany closed this Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants