separated type definitions and util functions
This commit is contained in:
55
src/types/lang.d.ts
vendored
Normal file
55
src/types/lang.d.ts
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
//this is a generic type, and needs 'any'
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
type basicObject = {[keys: string]: any};
|
||||
type basicObjectStr = {[keys: string]: string};
|
||||
|
||||
type bigString = string | string[];
|
||||
interface embedData {
|
||||
content?: string,
|
||||
embeds: MessageEmbed[]
|
||||
}
|
||||
interface embedField {
|
||||
name: string,
|
||||
value: bigString,
|
||||
inline?: boolean
|
||||
}
|
||||
|
||||
interface authorData {
|
||||
name: string,
|
||||
url?: string,
|
||||
icon?: string
|
||||
}
|
||||
interface footerData {
|
||||
text: string,
|
||||
icon?: string
|
||||
}
|
||||
interface embedObj {
|
||||
embed: true,
|
||||
|
||||
content?: string,
|
||||
title?: string,
|
||||
description?: bigString,
|
||||
/**
|
||||
* URL
|
||||
*/
|
||||
url?: string,
|
||||
/**
|
||||
* #FFFFFF
|
||||
*/
|
||||
color?: string,
|
||||
footer?: string | footerData,
|
||||
thumbnail?: string,
|
||||
/**
|
||||
* URL
|
||||
*/
|
||||
image?: string,
|
||||
/**
|
||||
* URL
|
||||
*/
|
||||
author?: string | authorData,
|
||||
fields?: embedField[],
|
||||
timestamp?: boolean | string | number
|
||||
}
|
||||
|
||||
type LangObj = { [keys:string]: LangObj | embedObj | string }
|
||||
type LangObjWhole = { [langid:string]: LangObj }
|
||||
Reference in New Issue
Block a user