mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix: 🚨 Remove useless function overloading
This commit is contained in:
parent
f2e9c862a6
commit
f260064083
|
|
@ -932,23 +932,12 @@ export class Note extends BaseInterface<typeof Notes, NoteTypeWithRelations> {
|
||||||
return Note.fromVersia(uri);
|
return Note.fromVersia(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Tries to fetch a Versia Note from the given URL.
|
|
||||||
*
|
|
||||||
* @param url The URL to fetch the note from
|
|
||||||
*/
|
|
||||||
public static async fromVersia(url: URL): Promise<Note>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes a Versia Note representation, and serializes it to the database.
|
* Takes a Versia Note representation, and serializes it to the database.
|
||||||
*
|
*
|
||||||
* If the note already exists, it will update it.
|
* If the note already exists, it will update it.
|
||||||
* @param versiaNote
|
* @param versiaNote - URL or Versia Note representation
|
||||||
*/
|
*/
|
||||||
public static async fromVersia(
|
|
||||||
versiaNote: VersiaEntities.Note,
|
|
||||||
): Promise<Note>;
|
|
||||||
|
|
||||||
public static async fromVersia(
|
public static async fromVersia(
|
||||||
versiaNote: VersiaEntities.Note | URL,
|
versiaNote: VersiaEntities.Note | URL,
|
||||||
): Promise<Note> {
|
): Promise<Note> {
|
||||||
|
|
|
||||||
|
|
@ -704,23 +704,12 @@ export class User extends BaseInterface<typeof Users, UserWithRelations> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Tries to fetch a Versia user from the given URL.
|
|
||||||
*
|
|
||||||
* @param url The URL to fetch the user from
|
|
||||||
*/
|
|
||||||
public static async fromVersia(url: URL): Promise<User>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes a Versia User representation, and serializes it to the database.
|
* Takes a Versia User representation, and serializes it to the database.
|
||||||
*
|
*
|
||||||
* If the user already exists, it will update it.
|
* If the user already exists, it will update it.
|
||||||
* @param versiaUser
|
* @param versiaUser URL or Versia User representation
|
||||||
*/
|
*/
|
||||||
public static async fromVersia(
|
|
||||||
versiaUser: VersiaEntities.User,
|
|
||||||
): Promise<User>;
|
|
||||||
|
|
||||||
public static async fromVersia(
|
public static async fromVersia(
|
||||||
versiaUser: VersiaEntities.User | URL,
|
versiaUser: VersiaEntities.User | URL,
|
||||||
): Promise<User> {
|
): Promise<User> {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue