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

chore(all): delete useless Omit define #31661

Merged
merged 1 commit into from
Aug 4, 2021

Conversation

Dreamerryao
Copy link
Contributor

[中文版模板 / 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
  • Other (about what?)

💡 Background and solution

TS includes Omit type
TS内置了Omit类型

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2021

Prepare preview

@codecov
Copy link

codecov bot commented Aug 4, 2021

Codecov Report

Merging #31661 (3a2a8c0) into master (3da2cca) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master    #31661   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          397       397           
  Lines         7588      7588           
  Branches      2076      2076           
=========================================
  Hits          7588      7588           
Impacted Files Coverage Δ
components/_util/type.ts 100.00% <ø> (ø)
components/breadcrumb/Breadcrumb.tsx 100.00% <ø> (ø)
components/button/button.tsx 100.00% <ø> (ø)
components/card/index.tsx 100.00% <ø> (ø)
components/input-number/index.tsx 100.00% <ø> (ø)
components/input/Input.tsx 100.00% <ø> (ø)
components/time-picker/index.tsx 100.00% <ø> (ø)
components/transfer/ListBody.tsx 100.00% <ø> (ø)
components/typography/Title.tsx 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3da2cca...3a2a8c0. Read the comment docs.

@afc163 afc163 merged commit 7f16838 into ant-design:master Aug 4, 2021
@genesiscz
Copy link

You just broke our code.

In your official documentation, there's a

export interface TimePickerProps extends Omit<PickerTimeProps<Dayjs>, 'picker'> {}

which you broken by deleting the Omit

@xrkffgg
Copy link
Member

xrkffgg commented Aug 25, 2021

cc @Dreamerryao

@Dreamerryao
Copy link
Contributor Author

You just broke our code.

In your official documentation, there's a

export interface TimePickerProps extends Omit<PickerTimeProps<Dayjs>, 'picker'> {}

which you broken by deleting the Omit

Emmm, so what happens? I delete useless Omit because TS support it after 3.5
https://www.typescriptlang.org/docs/handbook/utility-types.html

@Dreamerryao
Copy link
Contributor Author

And Typescript 3.5 pushlished since 2019 April. So I think we should embrace new features rather than add redundant code for compatibility. Please check your dependencies in package.json , typescript should >= 3.5.1

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.

4 participants