対象
わんコメ
利用OS
Windows
利用バージョン
OSのバージョン: 11
わんコメ: 8.0.0-beta.35
OneSDK は最新にしてます
内容
現在、OneSDK.post(url, config)
に対し、次のような使い方をすると動作自体は問題ありませんが、TypeScript による型エラーが発生します:
オブジェクト リテラルは既知のプロパティのみ指定できます。‘service’ は型 ‘AxiosRequestConfig’ に存在しません。ts(2353)
await OneSDK.post('http://localhost:11180/api/comments', {
service: { id: '26c434d4-db3b-4975-9061-093cf7cdb5b2' },
comment: {
userId: 'BotUserIDname',
id: Date.now() + Math.random().toString().slice(2, 12),
name: 'test',
comment: 'message',
profileImage: ''
}
});
また、下記は枠生成を行うリクエストですが、
下記の型エラーが起きます
オブジェクト リテラルは既知のプロパティのみ指定できます。‘id’ は型 ‘AxiosRequestConfig’ に存在しません。ts(2353)
this.servicesURL = http://localhost:11180/api/services
const response = await OneSDK.post(
this.servicesURL,
{
id: frameId,
name: `おみくじBOT:${name}`,
speech: true,
color: this.color2RGB(color)
},
);
現在のpostの型定義は下記のようになってました。
(method) OneSDK.post<any>(url: string, config: AxiosRequestConfig<any>): Promise<AxiosResponse<any, any>>
報告は以上です