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

typegram

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typegram - npm Package Compare versions

Comparing version 3.0.3 to 3.1.0

api.d.ts

4

default.d.ts

@@ -18,2 +18,6 @@ import { Typegram } from "./proxied";

export type TelegramP = DefaultTypegram["TelegramP"];
/** Utility type providing a version Telegram where all methods return ApiResponse objects instead of raw data */
export type TelegramR = DefaultTypegram["TelegramR"];
/** Utility type providing a version Telegram where all methods return Promises of ApiResponse objects, combination of TelegramP and TelegramR */
export type TelegramPR = DefaultTypegram["TelegramPR"];

@@ -20,0 +24,0 @@ /** This object represents the content of a media message to be sent. It should be one of

2

package.json
{
"name": "typegram",
"version": "3.0.3",
"version": "3.1.0",
"description": "Type declarations for the Telegram API",

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

@@ -73,2 +73,17 @@ # Types for the Telegram API

## Using API Response Objects
The Telegram API does not return just the requested data in the body of the response objects.
Instead, they are wrapped inside an object that has an `ok: boolean` status flag, indicating success or failure of the preceding API request.
This outer object is modelled in `typegram` by the `ApiResponse` type.
If you need the methods of `Telegram` to return `ApiResponse` objects instead of the raw data, consider using `TelegramR`.
This works analogously to `TelegramP`.
The type maps all methods of `Telegram` to a version where they return `ApiResponse` objects of the data, instead of the data themselves.
## Using Both Promises and API Response Objects
Yes.
`TelegramPR`.
## Customizing `InputFile`

@@ -75,0 +90,0 @@

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

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