@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
35 lines • 1.2 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
export const Tag = {
Symbol: "symbol",
};
/** @internal */
export const Tag$inboundSchema = z.nativeEnum(Tag);
/** @internal */
export const PropertyKey3$inboundSchema = z.object({
_tag: Tag$inboundSchema,
key: types.string(),
}).transform((v) => {
return remap$(v, {
"_tag": "tag",
});
});
export function propertyKey3FromJSON(jsonString) {
return safeParse(jsonString, (x) => PropertyKey3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PropertyKey3' from JSON`);
}
/** @internal */
export const PropertyKey$inboundSchema = smartUnion([
z.lazy(() => PropertyKey3$inboundSchema),
types.string(),
types.number(),
]);
export function propertyKeyFromJSON(jsonString) {
return safeParse(jsonString, (x) => PropertyKey$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PropertyKey' from JSON`);
}
//# sourceMappingURL=propertykey.js.map