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

plugin-common的请求处理系统,返回undefined无法通过类型检查 #254

Merged
merged 1 commit into from
May 2, 2021
Merged

Conversation

DGCK81LNN
Copy link
Contributor

文档中说请求处理函数返回undefined可以忽略请求,但实际开发时这样通不过类型检查。

修改了RequestHandler的定义,允许返回void类型。


(抱歉刚才没写完说明误开了pr

文档中说请求处理函数返回undefined可以忽略请求,但实际开发时这样通不过类型检查。
修改了RequestHandler的定义,允许返回void类型。
@codecov
Copy link

codecov bot commented May 2, 2021

Codecov Report

Merging #254 (04daa5b) into master (11a5443) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #254   +/-   ##
=======================================
  Coverage   92.37%   92.37%           
=======================================
  Files          57       57           
  Lines       10919    10919           
  Branches     2245     2245           
=======================================
  Hits        10086    10086           
  Misses        833      833           
Impacted Files Coverage Δ
packages/plugin-common/src/handler.ts 100.00% <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 11a5443...04daa5b. Read the comment docs.

Copy link
Member

@shigma shigma left a comment

Choose a reason for hiding this comment

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

感觉因为 koishi 官仓没有使用 strictNullChecks 所以不会报错,不过确实可能有这种需求,感谢

@shigma shigma merged commit ab64fee into koishijs:master May 2, 2021
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.

2 participants