tdlib-types
TypeScript icon, indicating that this package has built-in type declarations

0.1001008014.0 • Public • Published

tdlib-types

This npm package provides TypeScript and Flow types for TDLib.

These types can be used with tdl.

To install the types for e.g. TDLib v1.8.14, run:

$ npm install --save-dev tdlib-types@td-1.8.14

The available versions of tdlib-types can be found by running $ npm info tdlib-types dist-tags or in the "npm tags" section below.

Note: If you use TypeScript and get errors in .d.ts files, set skipLibCheck to true in the tsconfig.json file (this is the default when using tsc --init).


For information about the TL -> TypeScript/Flow translator, see GENERATOR.md.

Versioning conventions

Note: This information is mostly for maintaining tdlib-types, it isn't necessary for using this package. Just use the dist-tags.

The package is published to npm under versions 0.wxxxyyyzzz.v, where

  • x / y / z correspond to the x.y.z TDLib version with leading zeros appended.
  • w corresponds to the major version (the revision) of tdlib-types itself, newer revisions may contain breaking changes of the typings. w is always the same for all TDLib versions.
  • v corresponds to the minor version of tdlib-types itself. v is specific to a TDLib version. These updates may include fixes in case some of the typings were broken.
  • The major version of the npm package is always 0.

Some examples:

  • 0.1001006000.0 is types for TDLib v1.6.0 (tdlib-types major rev. 1, patch 0).
  • 0.4001007002.3 - TDLib v1.7.2 (tdlib-types major rev. 4, patch 3).
  • 0.24001004012.1 - TDLib v1.4.12 (tdlib-types major rev. 24, patch 1).

This naming scheme is similar to prebuilt-tdlib, but a bit more complicated.

For convenicene, td-X npm dist-tags are provided, so that types for the desired TDLib version can be simply installed using, for example, npm i -D tdlib-types@td-1.7.0 for TDLib v1.7.0 or npm i -D tdlib-types@td-1.8.5 for TDLib v1.8.5.

In case a major version of tdlib-types is released, a git tag tdlib-types@w is published to the tdl repository. Otherwise, the releases of tdlib-types are not git-tagged.

The current major version of tdlib-types is 1.

In the past, a different naming scheme was used without the patch (z) tdlib version.


If you use Flow and don't have fluture installed, add the following to .flowconfig:

[declarations]
<PROJECT_ROOT>/node_modules/.*

npm tags

  • npm
  • npm

Package Sidebar

Install

npm i tdlib-types

Weekly Downloads

39

Version

0.1001008014.0

License

MIT

Unpacked Size

2.68 MB

Total Files

5

Last publish

Collaborators

  • comonoid