Multiple typescipt type issues: TS2305,TS2707,TS7006
See original GitHub issueBug Report
Current Behavior A clear and concise description of the behavior.
// Your code here
export = (app) => {
// app.on is any type here
app.on('check_run.created', (context) => { /* context is any here */ });
};
Expected behavior/code Typescript should not show any compiler issues
Environment
- Probot version(s): 10.9.3
- Node/npm version: 12
- OS: Windows 10
- Typescript: 4.0.3
Possible Solution
fix the type issues. 🙃
Additional context/Screenshots
see https://github.com/renovatebot/auto-cancel-actions/pull/18 for repro
Typescript compiler log
node_modules/probot/lib/context.d.ts(6,10): error TS2305: Module '"../../@octokit/webhooks/dist-types/generated/get-webhook-payload-type-from-event"' has no exported member 'All'.
node_modules/probot/lib/types.d.ts(19,38): error TS2707: Generic type 'Webhooks<T>' requires between 0 and 1 type arguments.
src/index.ts(6,32): error TS7006: Parameter 'context' implicitly has an 'any' type.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Typescript issue with using multiple types - Stack Overflow
The fundamental issue is that narrowing the type of component doesn't narrow the type of convertedProps , so TypeScript doesn't know that ...
Read more >Handbook - Unions and Intersection Types - TypeScript
A union type describes a value that can be one of several types. We use the vertical bar ( | ) to separate...
Read more >Allow intersection of return types and multiple type-assertions
On point 1: it may cause existing typescript code to fail to compile, but that would be because an error was found (in...
Read more >Learn TypeScript: Complex Types Cheatsheet - Codecademy
A tuple in Typescript is declared with a fixed number of elements and hence, cannot be assigned to a tuple with a different...
Read more >How To Use Basic Types in TypeScript | DigitalOcean
TypeScript has multiple basic types that are used as building blocks when building more complex types. In the following sections, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
new release incoming via https://github.com/probot/probot/runs/1293879273?check_suite_focus=true
🎉 This issue has been resolved in version 10.9.4 🎉
The release is available on:
Your semantic-release bot 📦🚀