Kenta Iwasaki

Results 55 comments of Kenta Iwasaki

Right - to bypass the `enum` lookup object altogether, the code is a bit manual. Might you have any suggestions on improving how the codec is mapped? ```ts export enum...

Ah got it. Thought the enum had to map to numbers as there are some cases where we can't rely on the enum's key ordering to figure out an enum's...

> Knowing that, do you still think there is a need for `getLiteralEnumCodec(["sol", "like", "usdc"])`? Hmm I still think it would be a nice-to-have - Zod for example has separate...

I mean like this: ```ts import { getScalarEnumCodec } from "@solana/web3.js"; export enum Currency { sol = 3, like = 5, usdc = 9, } const codec = getScalarEnumCodec(Currency); console.log(codec.encode('sol'));...

Yep, will file it. For the case of this issue then, what do you think about having `getScalarEnumCodec` being able to take in an array of literals then vs. having...

> I think it'd be cleaner both internally and for the end-user to split them up into two separate codecs. I think something like `getStringUnionCodec` would better describe what the...

If we are to reference how types are named in C or Zig, the naming convention would be the following: ```ts getEnumCodec(); // Enums are available in C and Zig....

Hmm if we are to follow TypeScript's naming conventions, what about these? ```ts getRecordCodec(); // Represents a Record. getLiteralEnumCodec(); // Represents a literal enum expression. getDiscriminatedUnionCodec(); // Represents a union...

I would like to propose keeping it or at least provide a way to be able to fully customize and trace or log what gets passed to fetch. I can't...

The cons of polyfilling fetch though is that this will cause all requests to be logged/traced rather than just the ones by the Meilisearch client. It isn’t trivial to figure...