diff options
| author | okayurisotto <aytkzm@gmail.com> | 2023-04-12 01:07:24 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-12 01:07:24 +0900 |
| commit | 5002effd656abc8c82dbc1bdd904614b8157d8c1 (patch) | |
| tree | 9ed645f690b6a6fc1fc0c40e9a76ed547c92c3de /packages/sw/src/scripts/get-user-name.ts | |
| parent | fix(client): noPaging: true with gallery/featured (diff) | |
| download | misskey-5002effd656abc8c82dbc1bdd904614b8157d8c1.tar.gz misskey-5002effd656abc8c82dbc1bdd904614b8157d8c1.tar.bz2 misskey-5002effd656abc8c82dbc1bdd904614b8157d8c1.zip | |
Refactor sw (#10579)
* refactor(sw): remove dead code
* refactor(sw): remove dead code
* refactor(sw): remove dead code
* refactor(sw): remove dead code
* refactor(sw): remove dead code
* refactor(sw): remove dead code
* refactor(sw): 冗長な部分を変更
* refactor(sw): 使われていない煩雑な機能を削除
* refactor(sw): remove dead code
* refactor(sw): URL文字列の作成に`URL`を使うように
* refactor(sw): 型アサーションの削除とそれに伴い露呈したエラーへの対処
* refactor(sw): `append` -> `set` in `URLSearchParams`
* refactor(sw): `any`の削除とそれに伴い露呈したエラーへの対処
* refactor(sw): 型アサーションの削除とそれに伴い露呈したエラーへの対処
対処と言っても`throw`するだけ。いままでもこの状況ではエラーが投げられていたはずなので、この対処により新たな問題が起きることはないはず。
* refactor(sw): i18n loading
* refactor(sw): 型推論がうまくできる書き方に変更
`codes`が`(string | undefined)[]`から`string[]`になった
* refactor(sw): クエリ文字列の作成に`URLSearchParams`を使うように
* refactor(sw): `findClient`
* refactor(sw): `openClient`における`any`や`as`の書き換え
* refactor(sw): `openPost`における`any`の書き換え
* refactor(sw): `let` -> `const`
* refactor(sw): `any` -> `unknown`
* cleanup(sw): import
* cleanup(sw)
* cleanup(sw): `?.`
* cleanup(sw/.eslintrc.js)
* refactor(sw): `@typescript-eslint/explicit-function-return-type`
* refactor(sw): `@typescript-eslint/no-unused-vars`
* refactor(sw): どうしようもないところに`eslint-disable-next-line`を
* refactor(sw): `import/no-default-export`
* update operations.ts
* throw new Error
---------
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
Diffstat (limited to 'packages/sw/src/scripts/get-user-name.ts')
| -rw-r--r-- | packages/sw/src/scripts/get-user-name.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/sw/src/scripts/get-user-name.ts b/packages/sw/src/scripts/get-user-name.ts index 4daf203e06..e7e75ee25f 100644 --- a/packages/sw/src/scripts/get-user-name.ts +++ b/packages/sw/src/scripts/get-user-name.ts @@ -1,3 +1,3 @@ -export default function(user: { name?: string | null, username: string }): string { +export function getUserName(user: { name?: string | null; username: string }): string { return user.name === '' ? user.username : user.name ?? user.username; } |