![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@mtcute/tl
Advanced tools
TL schema and related utils used for mtcute.
Generated from TL layer 197 (last updated on 22.01.2025).
This package contains JSON schema, type declarations, binary (de-)serialization, errors, RSA keys and helper functions.
Package's major version is always TL schema layer number,
so version 42.0.0
means that this version was generated from TL layer 42.
.tl
files that are
automatically fetched from multiple sources and are merged together.errors.csv
and official Telegram errors JSON file.TypeScript typings and type helpers generated from the schema.
By default, all types are immutable (have their fields marked as readonly
). That is because most of the time you don't
really need to modify the objects, and modifying them will only lead to confusion. However, there are still valid
use-cases for mutable TL objects, so you can use exported
tl.Mutable
helper type to make a given object type mutable.
tl
is exported as a namespace to allow better code insights,
as well as to avoid cluttering global namespace and very long import statements.
MTProto schema is available in namespace mtp
, also exported by this package.
import { tl } from '@mtcute/tl'
const obj: tl.RawInputPeerChat = { _: 'inputPeerChat', chatId: 42 }
console.log(tl.isAnyInputPeer(obj)) // true
RPC errors are also exposed in this package in tl.errors
namespace:
import { tl } from '@mtcute/tl'
try {
await client.call(...)
} catch (e) {
if (e instanceof tl.errors.ChatInvalidError) {
console.log('invalid chat')
} else throw e
}
/api-schema.json
JSON file describing all available TL classes, methods and unions. Can be used to write custom code generators
This very file is used to generate binary serialization and TypeScript typings for
@mtcute/tl
.
import * as tlSchema from '@mtcute/tl/raw-schema.json'
console.log(`Current layer: ${tlSchema.apiLayer}`)
// Current layer: 124
/binary/reader.js
Contains mapping used to read TL objects from binary streams.
import { __tlReaderMap } from '@mtcute/tl/binary/reader.js'
import { TlBinaryReader } from '@mtcute/tl-runtime'
const reader = TlBinaryReader.manual(new Uint8Array([...]))
console.log(readerMap[0x5bb8e511 /* mt_message */](reader))
// { _: 'mt_message', ... }
/binary/writer.js
Contains mapping used to write TL objects to binary streams.
import { __tlWriterMap } from '@mtcute/tl/binary/writer'
import { TlBinaryWriter } from '@mtcute/tl-runtime'
const writer = TlBinaryWriter.manual(100)
writerMap[0x5bb8e511 /* mt_message */](writer, { ... })
console.log(writer.result())
// Uint8Array <11 e5 b8 5b ...>
/binary/rsa-keys.js
Contains RSA keys used when authorizing with Telegram.
old
flag also determines if the client should use the old
RSA padding scheme.
FAQs
TL schema used for mtcute
The npm package @mtcute/tl receives a total of 719 weekly downloads. As such, @mtcute/tl popularity was classified as not popular.
We found that @mtcute/tl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.