Gerald Lewis
Gerald Lewis
@mulias there's an implied expectation that input is valid JSON (_"`json-type-validation`"_), but it doesn't _technically_ have to be, right? I can't remember if you explicitly made a determination on that....
@RocketPuppy maybe I'm missing your point there, but they're distinct in JS -- e.g., the [`in`](http://es5.github.io/#x11.8.7) operator. ```javascript const ab = {a: true, b: undefined}; 'b' in ab; // true...
```typescript interface AB { a: string; b?: number; } ``` ```typescript const decoderAB1 = object({ a: string(), b: optional(number()) }); ``` `AB1` is my preferred decoder. ```typescript const decoderAB2 =...
```typescript interface CD { c: string; d: number | undefined; } ``` ```typescript const decoderCD1 = object({ c: string(), d: optional(number()) }); ``` I think `CD1` is _okay_. I don't...
```typescript interface E { e: string | number; } ``` ```typescript const decoderE1 = object({ e: union(string(), number()) }); ``` `E1` is my preferred decoder. ```typescript const decoderE2 = object({...
Sorry for the spam comments, esp. since I'm re-evaluating (I hadn't updated my mental model and was interpreting the `interface`s as e.g. the shape of data returned from an api).
I like this idea; in the meantime, updating [settings.local.json](https://github.com/anthropics/claude-code/issues/79#issuecomment-3033321002) worked for me 👍