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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: result types #18445

Merged
merged 2 commits into from Sep 6, 2019
Merged

fix: result types #18445

merged 2 commits into from Sep 6, 2019

Conversation

ycjcl868
Copy link
Member

@ycjcl868 ycjcl868 commented Aug 23, 2019

馃 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

馃敆 Related issue link

馃挕 Background and solution

馃摑 Changelog

Language Changelog
馃嚭馃嚫 English
馃嚚馃嚦 Chinese

鈽戯笍 Self Check before Merge

  • 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

@netlify
Copy link

netlify bot commented Aug 23, 2019

Deploy preview for ant-design ready!

Built with commit 77254c6

https://deploy-preview-18445--ant-design.netlify.com

@codecov
Copy link

codecov bot commented Aug 25, 2019

Codecov Report

Merging #18445 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #18445   +/-   ##
=======================================
  Coverage   96.41%   96.41%           
=======================================
  Files         280      280           
  Lines        7522     7522           
  Branches     2089     2089           
=======================================
  Hits         7252     7252           
  Misses        268      268           
  Partials        2        2
Impacted Files Coverage 螖
components/result/index.tsx 100% <100%> (酶) 猬嗭笍

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 271c7aa...77254c6. Read the comment docs.

@ycjcl868
Copy link
Member Author

ycjcl868 commented Aug 25, 2019

绫诲瀷鏈夌偣闂锛屽厛涓嶅悎

ztplz
ztplz approved these changes Aug 26, 2019
@@ -24,7 +24,7 @@ export type ResultStatusType = ExceptionStatusType | keyof typeof IconMap;

export interface ResultProps {
icon?: React.ReactNode;
status: ResultStatusType;
status?: ResultStatusType;
Copy link
Contributor

@ztplz ztplz Aug 26, 2019

Choose a reason for hiding this comment

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

status? === ResultStatusType || undefined 鐪嬩簡涓涓 鍚庨潰status鐩存帴瑙f瀯鐨 鐢ㄥ埌鐨勫湴鏂硅鍔爊on-null assertion operator

Copy link
Member Author

@ycjcl868 ycjcl868 Aug 27, 2019

Choose a reason for hiding this comment

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

status 鍙互涓嶄紶锛屾垜鍔犱竴鎶 asset

@@ -46,7 +46,7 @@ const ExceptionStatus = Object.keys(ExceptionMap);
const renderIcon = (prefixCls: string, { status, icon }: ResultProps) => {
const className = classnames(`${prefixCls}-icon`);

if (ExceptionStatus.includes(status)) {
if (ExceptionStatus.includes(status as ResultStatusType)) {
Copy link
Contributor

@ztplz ztplz Aug 27, 2019

Choose a reason for hiding this comment

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

涓嶉渶瑕乤ssertion 鐩存帴闈炵┖灏辫浜

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

3 participants