Skip to content

Commit

Permalink
Fix type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
woxtu committed Jun 22, 2024
1 parent 2acbec6 commit e50a074
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/src/filters/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
import * as Misskey from 'misskey-js';
import { url } from '@/config.js';

export const acct = (user: misskey.Acct) => {
export const acct = (user: Misskey.Acct) => {
return Misskey.acct.toString(user);
};

export const userName = (user: Misskey.entities.User) => {
return user.name || user.username;
};

export const userPage = (user: misskey.Acct, path?, absolute = false) => {
export const userPage = (user: Misskey.Acct, path?: string, absolute = false) => {
return `${absolute ? url : ''}/@${acct(user)}${(path ? `/${path}` : '')}`;
};

0 comments on commit e50a074

Please sign in to comment.