Comments (2)
Hi @SimenB! :)
Ah, this is a good catch actually. I just published a quick fix for this on 0.32.17. In the update, passing <any>
for the generic parameter is permitted (as it does technically pass the TSchema
constraint), however the StaticDecode will infer as unknown
if it detects any
is being passed. I've drafted a bit of info on the fix over at #799
Let me know if this helps resolve things :)
Cheers!
S
from typebox.
Cool, thanks! Using TypeCheck<TUnknown>
is fine in our case (it's really <T extends TSchema = any>
, then TypeCheck<T>
that was in our codebase, and defaulting to TUnknown
rather than any
is a better solution 😀)
from typebox.
Related Issues (20)
- Reduce unnecessary cloning in `Value.Convert` HOT 1
- [typebox-codegen] Option to emit types wrapped in arrow function? HOT 1
- Type.Mapped does not handle optional properties the same as Typescript HOT 2
- Add changelog or create a new release for each tag HOT 3
- TypeCheck.Decode return type inferred incorrectly? HOT 12
- Feature request: functions as defaults HOT 3
- Composite doesn't check additionalProperties HOT 2
- Custom TypeRegistry and TypeFormat HOT 1
- [feat] describe a object with pattern key, and literal key at the same time HOT 1
- Easier/general way to implement Typescript's "key remapping via `as`" approach HOT 1
- Overriding Schema Title HOT 1
- Cannot find module "./assert/index.mjs" HOT 1
- Encode is called twice on Type.Transform when inner type is Type.Intersection HOT 1
- StaticDecode cannot handle union of literals, while Static can HOT 1
- How to validate raw json schema HOT 2
- Why is Nullable not a first class Type? HOT 4
- Value.Convert does not seem to convert sometimes HOT 3
- `Value.Default` corrupts data in unions
- Is there a way to coerce when creating a schema? HOT 2
- Avoid losing precision when converting to bigints HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typebox.