@octokit/webhooks
Advanced tools
Comparing version 5.3.1 to 5.3.2
{ | ||
"name": "@octokit/webhooks", | ||
"version": "5.3.1", | ||
"version": "5.3.2", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -27,3 +27,3 @@ const fs = require('fs') | ||
signatures.push(` | ||
public on (event: ${events}, callback: (event: Webhooks.WebhookEvent<${typeName}>) => void): void | ||
public on (event: ${events}, callback: (event: Webhooks.WebhookEvent<Webhooks.${typeName}>) => (Promise<void> | void)): void | ||
`) | ||
@@ -38,12 +38,12 @@ }) | ||
export type Options = { | ||
type Options = { | ||
secret: string | ||
path?: string | ||
transform?: (event: Webhooks.WebhookEvent<T>) => Webhooks.WebhookEvent<T> & { [key: string]: any } | ||
transform?: (event: Webhooks.WebhookEvent<any>) => Webhooks.WebhookEvent<any> & { [key: string]: any } | ||
} | ||
${tw.generate('typescript', { inlined: false }).replace(/type /g, 'export type ')} | ||
declare namespace Webhooks { | ||
${tw.generate('typescript', { inlined: false })} | ||
export namespace Webhooks { | ||
export interface WebhookEvent<T> { | ||
interface WebhookEvent<T> { | ||
id: string | ||
@@ -58,8 +58,7 @@ name: string | ||
export class Webhooks { | ||
constructor (options: Options) | ||
declare class Webhooks { | ||
constructor (options?: Options) | ||
public on (event: 'error', callback: (event: Error) => void): void | ||
public on (event: '*' | string | string[], callback: (event: Webhooks.WebhookEvent<any>) => void): void | ||
public on (event: '*' | string | string[], callback: (event: Webhooks.WebhookEvent<any>) => Promise<void>): void | ||
public on (event: '*' | string[], callback: (event: Webhooks.WebhookEvent<any>) => Promise<void> | void): void | ||
${signatures.join('\n')} | ||
@@ -66,0 +65,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
181935
5166