Skip to content

Is a simple interface for replace "[key: string]: T" or "[key: number]: T"

License

Notifications You must be signed in to change notification settings

GollumJS/GollumTS-ObjectType

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;"
	

About

Is a simple interface for replace "[key: string]: T" or "[key: number]: T"

Resources

License

Stars

Watchers

Forks

Packages

No packages published