modify IActivity definition and add IStrictActivity

This commit is contained in:
Jeffrey Hsu 2025-01-14 02:56:47 +08:00
parent 999ae23e4c
commit 011cd6a549

View File

@ -1,13 +1,21 @@
declare global { declare global {
interface IActivity<T = string> { interface IActivity {
id: string id: string
content: T content: null | string | IContent
op_type: string op_type: 'commit_repo' | 'create_repo' | 'delete_branch' | 'delete_tag' | 'merge_pull_request'
repo: { repo: {
name: string name: string
html_url: string html_url: string
owner: {
login: string
}
} }
created: string created: string
ref_name: string
}
interface IStrictActivity extends IActivity {
content: IContent | null
} }
interface IContent { interface IContent {