gollumts-trait

1.1.1 • Public • Published

GollumTS-Trait

Simple trait decorator for TS class.

Install

npm install gollumts-trait

Use trait

import {Trait} from "gollumts-trait";

export class Animal {
	
	public eat(): void {
		console.log('This animal eatttt.');
	};
	
}


export class Human implements Animal {
	
	@Trait(Animal) 
	public eat(): void {};
	
}

Result

let human = new Human();

human.eat() //  display: 'This animal eatttt.'

Package Sidebar

Install

npm i gollumts-trait

Weekly Downloads

2

Version

1.1.1

License

none

Last publish

Collaborators

  • smeagolworms4