Atlassian Forge:我在哪里可以找到触发函数的类型定义

Atlassian Forge: Where do I find type definitions for a trigger function

当我创建一个新应用程序作为产品触发器时,我得到一个 index.jsx 看起来像:

export async function run(event, context) {
    console.log('Hello World!');
}

我可以将 index.jsx 重命名为 tsx,该文件被视为 Typescript 文件,但是我在哪里可以找到 èventcontext 的定义?

我从 Atlassian 工作人员那里得到了以下答案:

we don’t have TS definitions for the event and context in code, but you can find some more detail about the payload for different product events at https://developer.atlassian.com/platform/forge/events-reference/jira

You could also try console.log the event and context functions and use the forge logs command to see what information there is.

你在这里找到它:https://community.developer.atlassian.com/t/where-do-i-find-type-definitions-for-a-forge-trigger-function/51199/2