compiler/interfaces.d.ts
Florian Bouillon dd41d619d2
Cleaned-up (#16)
* Cleaned-up

Signed-off-by: Avior <florian.bouillon@delta-wings.net>

* Update rule

Signed-off-by: Avior <florian.bouillon@delta-wings.net>

* Fix interface

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-08-12 20:55:27 +00:00

8 lines
378 B
TypeScript

// eslint-disable-next-line @typescript-eslint/ban-types
export interface Endpoint<Index extends {} = {}, Item extends {} = {}, SubItem extends {} = {}, C = undefined> {
index(common: C): Promise<Index | undefined>
item(common: C): Promise<Record<string, Item> | undefined>
sub?(common: C, item: string): Promise<Record<string, SubItem> | undefined>
common?(): Promise<C>
}