cleanup types

pull/23/head
cupcakearmy 5 years ago
parent 504ad639ab
commit 1c6a061dd1

@ -1,3 +1,7 @@
export type StringOrArray = string | string[]
// BACKENDS
type BackendLocal = { type BackendLocal = {
type: 'local' type: 'local'
key: string key: string
@ -62,30 +66,26 @@ export type Backend =
export type Backends = { [name: string]: Backend } export type Backends = { [name: string]: Backend }
export type ForgetPolicy = { // LOCATIONS
last?: number,
hourly?: number,
daily?: number,
weekly?: number,
monthly?: number,
yearly?: number,
within?: string,
tags?: string[],
}
export type Location = { export type Location = {
from: string from: string
to: string | string[] to: StringOrArray
keep?: ForgetPolicy hooks?: {
before?: StringOrArray
after?: StringOrArray
}
options?: { options?: {
[key: string]: { [key: string]: {
[key: string]: string | string[] [key: string]: StringOrArray
} }
} }
} }
export type Locations = { [name: string]: Location } export type Locations = { [name: string]: Location }
// OTHER
export type Config = { export type Config = {
locations: Locations locations: Locations
backends: Backends backends: Backends

Loading…
Cancel
Save