复制
static getPenInfo(): Promise<APIResponse<PenInfo>>;
APIResponse<PenInfo>:result为PenInfo
示例
复制
import { PluginCommAPI } from 'sn-plugin-lib';
export async function exampleGetPenInfo() {
const res = await PluginCommAPI.getPenInfo();
if (!res.success) {
throw new Error(res.error?.message ?? 'getPenInfo 调用失败');
}
return res.result;
}