This package has been deprecated

Author message:

The types for version 0.7.3 were merged to DefinitelyTyped and published on npm. Please install @types/libsodium-wrappers.

libsodium-type-generator
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

libsodium-type-generator Dependabot Status

This is a TypeScript declaration file generator for libsodium.js 0.7.3.

The types for version 0.7.3 were merged to DefinitelyTyped and published on npm. Other versions are not supported (yet).

Installation

yarn global add libsodium-type-generator

or

npm install -g libsodium-type-generator

Run

Usage: libsodium-type-generator [options]

Options:

  -V, --version               output the version number
  -o, --output <file|dir>     Specify the output file or directory (required)
  -b, --base <path>           Specify the libsodium.js base path
  -s, --sumo                  Generate types for the sumo version
  -h, --help                  output usage information

Example:

curl -L https://github.com/jedisct1/libsodium.js/archive/master.tar.gz -o /path/to/libsodium.tar.gz
tar -C /path/to/ -zxvf /path/to/libsodium.tar.gz
libsodium-type-generator -o /path/to/libsodium.d.ts -b /path/to/libsodium.js-master/

or

libsodium-type-generator -o /path/to/libsodium.d.ts
# source will be downloaded from GitHub and saved to a temp folder

Include in your project

import TypeGenerator from 'libsodium-type-generator';

const generator = new TypeGenerator('/path/to/outputfile');

generator
  .generate()
  .then(outputFile => {
    // success!
    console.log(outputFile); // /path/to/outputfile
  })
  .catch(error => {
    // handle error
  });

Readme

Keywords

none

Package Sidebar

Install

npm i libsodium-type-generator

Weekly Downloads

49

Version

3.0.0

License

MIT

Unpacked Size

43.7 kB

Total Files

17

Last publish

Collaborators

  • ffflorian