[WEB-654] fix: enums export in the types package (#3887)

* fix: enums export in the types package

* chore: remove NestedKeyOf type
This commit is contained in:
Aaryan Khandelwal
2024-03-06 18:46:36 +05:30
committed by GitHub
parent cace132a2a
commit b3d3c0fb06
12 changed files with 52 additions and 58 deletions

View File

@@ -1,8 +1,16 @@
import { IIssueActivity, TIssuePriorities } from "../issues";
import { TIssue } from "../issues/issue";
import { TIssueRelationTypes } from "../issues/issue_relation";
import { TStateGroups } from "../state";
import { EDurationFilters } from "./enums";
import { IIssueActivity, TIssuePriorities } from "./issues";
import { TIssue } from "./issues/issue";
import { TIssueRelationTypes } from "./issues/issue_relation";
import { TStateGroups } from "./state";
enum EDurationFilters {
NONE = "none",
TODAY = "today",
THIS_WEEK = "this_week",
THIS_MONTH = "this_month",
THIS_YEAR = "this_year",
CUSTOM = "custom",
}
export type TWidgetKeys =
| "overview_stats"

View File

@@ -1,8 +0,0 @@
export enum EDurationFilters {
NONE = "none",
TODAY = "today",
THIS_WEEK = "this_week",
THIS_MONTH = "this_month",
THIS_YEAR = "this_year",
CUSTOM = "custom",
}

View File

@@ -1,2 +0,0 @@
export * from "./dashboard";
export * from "./enums";

View File

@@ -29,13 +29,3 @@ export * from "./auth";
export * from "./api_token";
export * from "./instance";
export * from "./app";
export * from "./enums";
export type NestedKeyOf<ObjectType extends object> = {
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object
? ObjectType[Key] extends { pop: any; push: any }
? `${Key}`
: `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}`
: `${Key}`;
}[keyof ObjectType & (string | number)];