structures made async to be overrideable

This commit is contained in:
Skillz
2020-09-17 17:49:18 -04:00
parent f1cf073d2c
commit f3a113a6e3
17 changed files with 70 additions and 65 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
import { Unpromise } from "../types/misc.ts";
import { RoleData } from "../types/role.ts";
export function createRole(data: RoleData) {
export async function createRole(data: RoleData) {
return {
...data,
/** The @ mention of the role in a string. */
@@ -8,4 +9,4 @@ export function createRole(data: RoleData) {
};
}
export interface Role extends ReturnType<typeof createRole> {}
export interface Role extends Unpromise<ReturnType<typeof createRole>> {}