Skip to content

Conversation

@YoniKiriaty
Copy link
Contributor

image

@YoniKiriaty YoniKiriaty self-assigned this Jan 26, 2026
@YoniKiriaty YoniKiriaty added the feature A new Feature! label Jan 26, 2026

const serdeTele = createRecordSerde<typeof defaultTele>({
transitionShift: serdeShift,
shifts: serdeArray(serdeShift) as any, //shifts requires 4 and this is how to fix that

Check warning

Code scanning / ESLint

Disallow assigning a value with type `any` to variables and properties Warning

Unsafe assignment of an any value.

const serdeTele = createRecordSerde<typeof defaultTele>({
transitionShift: serdeShift,
shifts: serdeArray(serdeShift) as any, //shifts requires 4 and this is how to fix that

Check warning

Code scanning / ESLint

Disallow type assertions that narrow a type Warning

Unsafe assertion to any detected: consider using a more specific type to ensure safety.

const serdeTele = createRecordSerde<typeof defaultTele>({
transitionShift: serdeShift,
shifts: serdeArray(serdeShift) as any, //shifts requires 4 and this is how to fix that

Check warning

Code scanning / ESLint

Disallow the `any` type Warning

Unexpected any. Specify a different type.
export const serdeRecordFieldsBuilder = (
fieldNamesSerdes: Record<string, Serde<unknown>>
): FieldsRecordSerde<unknown> => {
fieldNamesSerdes: Record<string, Serde<any>>,

Check warning

Code scanning / ESLint

Disallow the `any` type Warning

Unexpected any. Specify a different type.
fieldNamesSerdes: Record<string, Serde<unknown>>
): FieldsRecordSerde<unknown> => {
fieldNamesSerdes: Record<string, Serde<any>>,
): FieldsRecordSerde<any> => {

Check warning

Code scanning / ESLint

Disallow the `any` type Warning

Unexpected any. Specify a different type.
return recordSerde;
};

export const createRecordSerde = <T extends {}>(record: Serdify<T>) =>

Check warning

Code scanning / ESLint

Require explicit return and argument types on exported functions' and classes' public class methods Warning

Missing return type on function.
};

export const createRecordSerde = <T extends {}>(record: Serdify<T>) =>
pipe(serdeRecordFieldsBuilder(record), serdeRecord) as Serde<T>;

Check warning

Code scanning / ESLint

Disallow type assertions that narrow a type Warning

Unsafe type assertion: type 'Serde' is more narrow than the original type.
@@ -0,0 +1,123 @@
// בס"ד

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ew line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A new Feature!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants