lang
packageLanguages are awesome! Well... most of them are. And that's the case for TypeScript.
Sometimes there are a couple things we miss though...
And, when that happens, instead of complaining about it, we create a lang package :)
Check the API documentation at http://tokilabs.github.io/lang
{}
) for ConcreteType type parameterA function which receives an object and returns one of it's properties
An object that holds the parts that make up a FQN
Represents a serialized version of another type
Specifies the class of a property.
Defines custom transformation logic when converting from a primitive to a class
The function used to perform the transformation
Transformation options
Marks property as excluded from the process of transformation. By default it excludes the property for both constructorToPlain and plainToConstructor transformations, however you can specify on which of transformation types you want to skip this property.
Marks property as included in the process of transformation. By default it includes the property for both constructorToPlain and plainToConstructor transformations, however you can specify on which of transformation types you want to skip this property.
Decorates a class or function with a Fully Qualified Name
An FQN string has the following format: {package}:{namespace}.{class}
Examples:
The Fully Qualified Name of the class
Defines custom transformation logic when converting from a primitive to a class
The function used to perform the transformation
Transformation options
Transform the object from class to plain object and return only with the exposed properties.
Transform the object from class to plain object and return only with the exposed properties.
Converts an ordinary object and it's properties to instances of their respective classes
Transformation options
Creates a promise which always resolves in the specified milliseconds
Deserializes given JSON string or primitive object to an object or an array of objects of the given class.
Deserializes given JSON string to an array of objects of the given class.
Escapes a regular expression
Hydrates an existing class instance with data from a plain object
An instance to fill
An object to get the data from
Transformation options
Hydrates many existing instances with data from plain objects
An array of instances to fill
An array of plain objects to get the data from
Transformation options
Hydrates an existing plain object with data from a class instance
An instance to get the data from
An object to fill
Transformation options
Hydrates an existing plain object with data from a class instance
An array of instances to get the data from
An array of objects to fill
Transformation options
Checks if value
is undefined, null or an empty string
true
if value
is undefined, null or empty
Checks if value
is of type boolean
Returns true if value
is a Date
Checks if value
is undefined, null or an empty string
true
if value
is undefined, null or empty
Returns true if val is either a function or an object
Checks if value
is defined and has a value other than null.
true
if value is neither undefined or null; false
otherwise
Returns true if val is not a function nor an object
Creates a compare function based on an Expression and an OrderDirection
The type of the objects being compared
Expression for the property to be compared
The order direction
A function that compares two objects of type T
A function which does nothing
Parses an FQN string returning FqnDetails
Converts a class instance to a plain javascript object
An instance of T
Transformation options
Requires a class by it's FQN
Serializes given instance to a JSON string.
The instance to be serialized
Transformation options
Serializes an array of instances to a JSON string.
The instances to be serialized
Transformation options
Returns a new Date object set to 00:00:00 of today
Generated using TypeDoc
Represents a constructor for objects of type T