Move User type to own module

This commit is contained in:
Henrik Hüttemann 2023-05-23 15:28:36 +02:00
parent 59dbce5672
commit 82bb59d6f9
No known key found for this signature in database
GPG Key ID: 9F7BD10E0A8A111E
2 changed files with 8 additions and 8 deletions

View File

@ -3,6 +3,7 @@ import readline from 'node:readline'
import log from './logger' import log from './logger'
import { whoami } from './synapse' import { whoami } from './synapse'
import { storage } from './storage' import { storage } from './storage'
import { RcUser } from './users'
log.info('rocketchat2matrix starts.') log.info('rocketchat2matrix starts.')
@ -12,14 +13,6 @@ const enum Entities {
Messages = 'rocketchat_message.json', Messages = 'rocketchat_message.json',
} }
type RcUser = {
username: string
name: string
roles: string[]
_id: string
__rooms: string[]
}
function loadRcExport(entity: Entities): Promise<void> { function loadRcExport(entity: Entities): Promise<void> {
const rl = readline.createInterface({ const rl = readline.createInterface({
input: fs.createReadStream(`./inputs/${entity}`, { input: fs.createReadStream(`./inputs/${entity}`, {

7
src/users.ts Normal file
View File

@ -0,0 +1,7 @@
export type RcUser = {
username: string
name: string
roles: string[]
_id: string
__rooms: string[]
}