Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@arpc-packages/client-gen

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arpc-packages/client-gen - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

src/golang.test.ts

2

package.json
{
"name": "@arpc-packages/client-gen",
"version": "0.1.0",
"version": "0.2.0",
"module": "dist/index.mjs",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -11,2 +11,4 @@ export type Exception = {

export type LiteralType = string | number | bigint | boolean | null;
export type Signature = {

@@ -35,3 +37,3 @@ type: "string" | "number" | "bigint" | "boolean";

type: "literal";
value: string | number | bigint | boolean | null;
value: LiteralType;
};

@@ -38,0 +40,0 @@

export * from "./BuildData";
export * from "./python";
export { php } from "./php";
export { typescript } from "./typescript";
export { golang } from "./golang";
import type { Client, Enum, Method, Methods, Object, Signature } from "../BuildData";
// Renders the signature for a type.
function renderSignature(signature: Signature, enums: Enum[]) {
function renderSignature(signature: Signature, enums: Enum[]): string {
// Handle the easy types.

@@ -38,2 +38,5 @@ const v = typeMap[signature.type];

if (signature.type === "enum_value") return `typing.Literal[${Array.from(enums.find((x) => x.name === signature.enum)!.data.keys()).sort().map((x) => `${signature.enum}.${x}`).join(", ")}]`;
// Throw an error.
throw new Error(`Unknown signature type ${signature.type}.`);
}

@@ -319,3 +322,3 @@

null: "None",
};
} as const;

@@ -322,0 +325,0 @@ // Renders the input.

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc