proper mechanism to integrate with 3rd party types
See original GitHub issueproblem
import { Bananas } from '@fruit/banana'
import * as z from 'zod'
const schema = z.object({
apple: z.string(),
banana: z.doSomethingWith3pType() // z.object({}) ??
})
const myType = z.infer<typeof schema> // { apple: string, banana: ???? }
what the best way to get my 3p schema in? assuming because types have been compiled away, getting my 3p schema may not be possible, but, is there a mechanism to put my type into the schema, and get it reflected back out?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
proper mechanism to integrate with 3rd party types #52 - GitHub
You'd have to define a class that defines these methods and delegates to the appropriate methods on your third-party schemas. If you define...
Read more >Third-party integration — how to choose a vendor
Integrations are a part of many product managers' lives. Let's talk about how to think about integrations, and how to choose vendors.
Read more >Best practices for using third-party embeds - web.dev
This article discusses performance best practices that you can use when loading third-party embeds, efficient loading techniques and the ...
Read more >Extending Global or Third Party Library Typing - Malcolm Kee
Extending Global or Third Party Library Typing ... To extends global object e.g. Array , include the following code in any TypeScript file...
Read more >How to Choose Between Different Integration Approaches
Integration leaders must understand the different types of integration-delivery approaches and ensure the right technologies and methods are used for each.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cdaringe Just thought of a better way to do this!
This way you can still do validations with parse as you’d expect since
z.any()
allows any inputs, and the type inference works as expected. 👍Doh! I figured I was missing something! Perfecto, thx!