mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-26 18:24:36 +02:00
wip
This commit is contained in:
@@ -8,3 +8,11 @@ import { blind } from './objects/blind.js';
|
||||
export const OBJECT_DEFS = [
|
||||
blind,
|
||||
];
|
||||
|
||||
export function getObjectDef(type: string): typeof OBJECT_DEFS[number] {
|
||||
const def = OBJECT_DEFS.find(x => x.id === type);
|
||||
if (def == null) {
|
||||
throw new Error(`Unrecognized object type: ${type}`);
|
||||
}
|
||||
return def;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user