Skip to content

Commit

Permalink
style(types::EnumValues): remove some TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Nov 16, 2023
1 parent c94d532 commit 5f0abf5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@ export type DynamicStringFunc<T extends AnyParamConstructor<any>> = (doc: Docume
export type NestedDiscriminatorsFunction = DeferredFunc<(AnyParamConstructor<any> | DiscriminatorObject)[]>;

/** Type for enum "values" */
// TODO: replace with actual mongoose type if it becomes available
export type EnumValues =
| Array<string | number | null>
| ReadonlyArray<string | number | null>
| { [path: string | number]: string | number | null }; // unlike the mongoose type, "path" is a "string" or "number" here because of how typescript enums work

/** Type for the enum object with custom message*/
// TODO: replace with actual mongoose type if it becomes available
export interface EnumObj {
values: EnumValues | DeferredFunc<EnumValues>; // unlike the mongoose type, this will have to use "DeferredFunc"
message?: string;
Expand Down

0 comments on commit 5f0abf5

Please sign in to comment.