gollumts-objecttype

1.1.1 • Public • Published

GollumTS-ObjectType

Is a simple interface for replace "[key: string]: T" or "[key: number]: T" or "{new(...any): T; }"

Install:

npm install --save gollumts-objecttype

Example:

	
	import { ObjectString, ObjectNumber, ObjectConstructor } from 'gollumts-objecttype'
	
	const objectString: ObjectString<T> = {}; // replace "const objectString: {[key: string]: T} = {};"
	const objectNumber: ObjectNumber<T> = {}; // replace "const objectString: {[key: number]: T} = {};"
	const objectConstructor: ObjectConstructor<T> = null; // replace "const objectConstructor: {new(): T; } = null;"
	

Package Sidebar

Install

npm i gollumts-objecttype

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

2.69 kB

Total Files

5

Last publish

Collaborators

  • smeagolworms4