Add eslint and fix eslint errors, other minor improvements

This commit is contained in:
Szymon Nowakowski
2024-12-25 17:26:20 +01:00
parent 8c15df8e06
commit 135d54908f
21 changed files with 911 additions and 144 deletions

View File

@@ -10,7 +10,7 @@ export type ConstructorTypeId = typeof ConstructorTypeId;
export interface Brand<in out K extends string | symbol> {
readonly [BrandTypeId]: {
readonly [k in K]: K;
}
};
}
export declare namespace Brand {

View File

@@ -1,3 +1,4 @@
export const identity = <A>(a: A): A => a;
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- unsafe by design
export const unsafeCoerce: <A, B>(a: A) => B = identity as any;