Comments (9)
That isn't a viable solution. The types are autogenerated from our JSON schema
from webhooks.
Can you share your tsconfig
?
If you don't have strict
enabled, it resolves to never
from webhooks.
I have the default setting for strict. Here is my config:
// tsconfig.json
{
"extends": "./tsconfig.paths.json",
"compilerOptions": {
"lib": ["ESNext"],
"moduleResolution": "node",
"removeComments": true,
"sourceMap": true,
"target": "ESNext",
"outDir": "lib",
"skipLibCheck": true
},
"include": ["src/**/*.ts", "serverless.ts"],
"exclude": [
"node_modules/**/*",
".serverless/**/*",
".webpack/**/*",
"_warmup/**/*",
".vscode/**/*"
],
"ts-node": {
"require": ["tsconfig-paths/register"]
}
}
// tsconfig.paths.json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@functions/*": ["src/functions/*"],
"@languages/*": ["src/languages/*"],
"@src/*": ["src/*"],
"@utils/*": ["src/utils/*"]
}
}
}
from webhooks.
At the very minimum, we require that the strictNullChecks
be enabled.
The default value for strict
is false (which includes strictNullChecks
)
from webhooks.
Is there a reason for not updating the type to support both tsconfig options?
from webhooks.
Even with that change, you still need strictNullChecks
in order to use the types.
from webhooks.
See #395 also for more info
from webhooks.
While I can confirm that strictNullChecks: true
does remove the error, my suggestions also remove the error. If you wanted to force suspended_at
and suspended_by
to null
, then the Omit
approach I suggested would be the best path forward. I put together this example:
https://stackblitz.com/edit/typescript-4gwo1b?file=index.ts
from webhooks.
Okay, makes sense then
from webhooks.
Related Issues (20)
- Include event source/type as a property HOT 3
- Changes object can be undefined HOT 2
- Changes object has 19 possible keys but type is defined with only 3 of them HOT 5
- InstallationSuspendEvent installation property is typed to 'never' HOT 3
- Document that `strictNullChecks` is required to be enabled HOT 2
- Missing events HOT 4
- [BUG]: Remove required 'test' Check Run from repository HOT 2
- [BUG]: ProjectsV2Item and archived_at for created/converted events HOT 2
- [BUG]: invalid organization format in schema for repository HOT 7
- [BUG]: Incorrect secret_scanning_alert values (OpenAPI schema) HOT 2
- [BUG]: Webhook created type HOT 3
- [BUG]: `registry_package` is missing `installation` object HOT 2
- [BUG]: Type changed for `installation_repositories` event HOT 5
- [BUG]: `pull_request.auto_merge` properties should allow string or null HOT 6
- Add missing `merge_queue_entry` event HOT 1
- [MAINT]: Release is failing HOT 4
- [BUG]: Property 'title' does not exist on type 'never'. The intersection 'Issue & { state: "open"; closed_at: null; }' was reduced to 'never' because property 'closed_at' has conflicting types in some constituents. HOT 2
- [BUG]: completed workflow steps should have "cancelled" as possible conclusion HOT 2
- [BUG]: Pull request opened event JSON schema doesn't pass validation with AJV HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webhooks.