1.1.1 • Published 5 years ago
gollumts-objecttype v1.1.1
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;"