Skip to content

Commit 5fc769d

Browse files
author
João Dias
committed
feat(types): removed react-related types
1 parent 33bf4d7 commit 5fc769d

File tree

5 files changed

+28
-233
lines changed

5 files changed

+28
-233
lines changed

docs/docs/typings/generic.mdx

Lines changed: 0 additions & 63 deletions
This file was deleted.

docs/docs/typings/polymorphic-ref.mdx

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/typings/generic.ts

Lines changed: 0 additions & 76 deletions
This file was deleted.

src/typings/index.ts

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,31 @@
33
*
44
* (c) 2024 Feedzai
55
*/
6-
export * from "./generic";
7-
export * from "./polymorphic";
6+
7+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
8+
export type GenericAnyFunction = (...args: any) => any;
9+
10+
// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead
11+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
12+
export const tuple = <T extends string[]>(...args: T) => args;
13+
14+
export type GlobalPartial<T> = Partial<T>;
15+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
16+
export type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
17+
export type PartialObject<T> = GlobalPartial<T>;
18+
export type Many<T> = T | ReadonlyArray<T>;
19+
export type PropertyName = string | number | symbol;
20+
export type PropertyPath = Many<PropertyName>;
21+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
22+
export type ObjTypeWithAny = Record<string, any>;
23+
export type StringPropertyPath = Many<string>;
24+
export interface Dictionary<T> {
25+
[index: string]: T;
26+
}
27+
export interface NumericDictionary<T> {
28+
[index: number]: T;
29+
}
30+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
31+
export type PromiseValues<T extends Promise<any>[]> = {
32+
[K in keyof T]: T[K] extends Promise<infer U> ? U : never;
33+
};

src/typings/polymorphic.ts

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)