sinclairzx81

Results 171 comments of sinclairzx81

@Bram-dc Hi, > Why is preSerialization hook used instead of setSerializerCompiler? I believe the intent here was to apply the transform / encode "before" the value was sent for serialization....

@BenWoodworth @jayalfredprufrock Have just pushed the first revision of custom types in TypeBox. Documentation for using these types can be located [here](https://github.com/sinclairzx81/typebox#typecheck-custom). Updates are on `0.25.9`. ### Example The following...

Related https://github.com/esm-dev/esm.sh/issues/16

@ije Hi, thanks for the follow up on this! > can you please add a esm.sh specific field in the pakcage.json? Thanks, I'll give this some consideration, but may recommend...

Have noticed that explicitly setting hostname to `localhost` when listening seems to resolve the issue. ```typescript // ensure hostname is set (omitting the hostname results in 2000ms connection times) await...

### Compiler The following will check for the `optional` modifier `?` on `ts.PropertySignature` compiler side. ```typescript function isOptionalProperty(node: ts.PropertySignature) { return node.questionToken !== undefined } ``` ### Assertion The runtime...

> Ah, I got it by your hint. It is possible to distinguish through obj.hasOwnProperty(key) function. Sure, just use which ever has the fastest runtime performance. - Object.keys(value).includes(key) - good...

@samchon I do, but error handling is perhaps a topic for another time. I could recommend setting up a `TypeGuardErrorCode` enumeration similar to [this](https://github.com/sinclairzx81/typebox/blob/master/src/errors/errors.ts#L40-L90), and update `TypeGuardError` to accept the...

This has been implemented recently in TypeBox. To implement this correctly, you will need to check if the property value `extends undefined`. TypeBox implements a fast path extends check specifically...