tdlib-types

TypeScript / Flow types for TDLib

Usage no npm install needed!

<script type="module">
  import tdlibTypes from 'https://cdn.skypack.dev/tdlib-types';
</script>

README

tdlib-types

npm

TypeScript / Flow types for TDLib.

You can use these types with tdl.


Naming convention:

The package is published to npm under versions 0.wxxxyyy.zvvv.
The major version is always 0, since TDLib doesn't follow semver.
x / y / z correspond to x.y.z TDLib version.
w corresponds to the version of tdlib-types itself, newer revisions may contain fixes for the typings, usually breaking. w is always the same for all TDLib versions.
v corresponds to the minor revision of tdlib-types for specific TDLib version.
Leading zeros are omitted.

For example, 0.1001006.1 is types for TDLib v1.6.0 (tdlib-types revision 1, minor rev. 1),
0.4001007.2001 - TDLib v1.7.2 (tdlib-types revision 4, minor rev. 1),
0.24001004.12001 - TDLib v1.4.12 (tdlib-types revision 24, minor rev. 1).

There are also td-X npm dist-tags to conveniently install typings for appropriate TDLib versions. For example, npm install -D tdlib-types@td-1.6.0 or npm install -D tdlib-types@td-1.5.0.

The major version might be changed after revisions of the format itself.

If a new version (w) of tdlib-types is released, there will be a git tag tdlib-types@w in the tdl repository. There are no git tags for releases of tdlib-types for specific TDLib versions.


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

[declarations]
<PROJECT_ROOT>/node_modules/.*

(tdlib-types/.* instead of .* also can be used.)


If you use TypeScript and see errors in .d.ts files, set skipLibCheck to true in your tsconfig.json (it is the default in tsc --init).


See also GENERATOR.md.


npm tags:

npm
npm
npm
npm
npm