JavaScript/typescript/类型:修订间差异
来自康健生活
| 第20行: | 第20行: | ||
可变参数 | 可变参数 | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="typescript"> | ||
interface HttpFetchInterface { | interface HttpFetchInterface { | ||
fetch(...params: any[]): Promise<object>; | fetch(...params: any[]): Promise<object>; | ||
} | } | ||
async fetch (username:string, password:string, httpMethod?:string): Promise<object>{</syntaxhighlight> | async fetch (username:string, password:string, httpMethod?:string): Promise<object>{</syntaxhighlight> | ||