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

1.0.2 • Public • Published

typescript_node_module_example

This is a library for test install and import from a total different project.

If you import this library to your project you can do:

  • import a particular module
  • extend classes
  • use interfaces on your project

This library is published on NPM packages.

Testing library

 
// packagetest.ts file
import * as animal_module from 'animal_module';
 
class Snake extends animal_module.Animal {
 
    constructor(name: string) { super(name); }
 
    move(distanceInMeters: number = 5) {
        console.log('Slithering...');
        super.move(distanceInMeters);
    }
}
 
let sam = new Snake('Sammy the Python');
sam.move();

Expected result

$ node packagetest.js
Slithering...
Sammy the Python moved 5m.
Galloping...
Tommy the Palomino moved 34m.

Publishing package

npm publish

Readme

Keywords

none

Package Sidebar

Install

npm i animal_module_example

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • pablorsk