refactor(backend): 必要ないas anyを消去 (#10293)
This commit is contained in:
parent
65b1524f92
commit
0ac1fc846b
|
@ -90,7 +90,7 @@ export class SignupService {
|
|||
cipher: undefined,
|
||||
passphrase: undefined,
|
||||
},
|
||||
} as any, (err, publicKey, privateKey) =>
|
||||
}, (err, publicKey, privateKey) =>
|
||||
err ? rej(err) : res([publicKey, privateKey]),
|
||||
));
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ export class ApInboxService {
|
|||
} else if (isFlag(activity)) {
|
||||
await this.flag(actor, activity);
|
||||
} else {
|
||||
this.logger.warn(`unrecognized activity type: ${(activity as any).type}`);
|
||||
this.logger.warn(`unrecognized activity type: ${activity.type}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ export class ApNoteService {
|
|||
throw new Error('invalid note');
|
||||
}
|
||||
|
||||
const note: IPost = object as any;
|
||||
const note = object as IPost;
|
||||
|
||||
this.logger.debug(`Note fetched: ${JSON.stringify(note, null, 2)}`);
|
||||
|
||||
|
|
|
@ -195,7 +195,8 @@ export const isPropertyValue = (object: IObject): object is IApPropertyValue =>
|
|||
object &&
|
||||
getApType(object) === 'PropertyValue' &&
|
||||
typeof object.name === 'string' &&
|
||||
typeof (object as any).value === 'string';
|
||||
'value' in object &&
|
||||
typeof object.value === 'string';
|
||||
|
||||
export interface IApMention extends IObject {
|
||||
type: 'Mention';
|
||||
|
|
|
@ -64,7 +64,7 @@ export class InboxProcessorService {
|
|||
const activity = job.data.activity;
|
||||
|
||||
//#region Log
|
||||
const info = Object.assign({}, activity) as any;
|
||||
const info = Object.assign({}, activity);
|
||||
delete info['@context'];
|
||||
this.logger.debug(JSON.stringify(info, null, 2));
|
||||
//#endregion
|
||||
|
|
Loading…
Reference in a new issue