Closed Tsuk1ko closed 2 years ago
例如我需要获取 GM_xmlhttpRequest 参数中 responseType 的类型,目前只能这么写
GM_xmlhttpRequest
responseType
Parameters<typeof GM_xmlhttpRequest>['0']['responseType']
但如果有导出类型 XhrRequest,就可以简化成
XhrRequest
XhrRequest['responseType']
很有道理,我一会发个版本
fix: by v2.0.1/CHANGELOG.md#201-features
sample
import type { MonkeyWindow, XhrRequest } from '$'; type ScriptInfo = MonkeyWindow['GM_info']; // if you want
例如我需要获取
GM_xmlhttpRequest
参数中responseType
的类型,目前只能这么写但如果有导出类型
XhrRequest
,就可以简化成