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

feat(route): provides namespace.any for better readability #719

Merged
merged 1 commit into from
Apr 6, 2020

Conversation

chentsulin
Copy link
Collaborator

@chentsulin chentsulin commented Apr 5, 2020

After: (use any as event type)

function App() {
  return router([	
    messenger.any(HandleMessenger),
    line.any(HandleLine),
    slack.any(HandleSlack),
    telegram.any(HandleTelegram),
    viber.any(HandleViber),
    whatsapp.any(HandleWhatsapp),
  ]);
}

Before:

function App() {
  return router([	
    messenger(HandleMessenger),
    line(HandleLine),
    slack(HandleSlack),
    telegram(HandleTelegram),
    viber(HandleViber),
    whatsapp(HandleWhatsapp),
  ]);
}

@codecov-io
Copy link

codecov-io commented Apr 5, 2020

Codecov Report

Merging #719 into release/1.4 will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release/1.4     #719      +/-   ##
===============================================
+ Coverage        80.82%   80.85%   +0.02%     
===============================================
  Files              108      108              
  Lines             4491     4497       +6     
  Branches          1078     1078              
===============================================
+ Hits              3630     3636       +6     
  Misses             815      815              
  Partials            46       46              
Impacted Files Coverage Δ
packages/bottender/src/line/routes.ts 100.00% <100.00%> (ø)
packages/bottender/src/messenger/routes.ts 100.00% <100.00%> (ø)
packages/bottender/src/slack/routes.ts 100.00% <100.00%> (ø)
packages/bottender/src/telegram/routes.ts 100.00% <100.00%> (ø)
packages/bottender/src/viber/routes.ts 100.00% <100.00%> (ø)
packages/bottender/src/whatsapp/routes.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 239adbf...9c55171. Read the comment docs.

@chentsulin chentsulin requested review from etrex and kpman April 6, 2020 05:22
@chentsulin chentsulin merged commit 58af51f into release/1.4 Apr 6, 2020
@chentsulin chentsulin deleted the route-any branch April 6, 2020 05:54
@chentsulin chentsulin mentioned this pull request Apr 15, 2020
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.

3 participants