raml-typesystem
Advanced tools
Comparing version 0.0.21 to 0.0.22
@@ -7,94 +7,26 @@ export import nominalTypes = require("./nominal-types"); | ||
export interface IStatus { | ||
/** | ||
* retur2ns true if status does not have errors | ||
*/ | ||
isOk(): boolean; | ||
/** | ||
* return true if this status contains a warning | ||
*/ | ||
isWarning(): boolean; | ||
/** | ||
* return true if this status contains a error | ||
*/ | ||
isError(): boolean; | ||
/** | ||
* returns human readable message associated with this status | ||
*/ | ||
getMessage(): string; | ||
/** | ||
* returns an array of nested statuses | ||
*/ | ||
getSubStatuses(): IStatus[]; | ||
/** | ||
* return an object which raised this status | ||
*/ | ||
getSource(): any; | ||
/** | ||
* returns primitive error statuses gathered recurrently, returns warnings to. | ||
*/ | ||
getErrors(): IStatus[]; | ||
getValidationPath(): IValidationPath; | ||
/** | ||
* returns path to this status | ||
*/ | ||
getValidationPathAsString(): string; | ||
} | ||
/** | ||
* this is a common super interface for restrictions and meta data | ||
*/ | ||
export interface ITypeFacet { | ||
/** | ||
* name of the facet | ||
*/ | ||
facetName(): string; | ||
/** | ||
* broadest type to which this facet can be added | ||
*/ | ||
requiredType(): IParsedType; | ||
/** | ||
* returns a type to which this facet belongs | ||
*/ | ||
owner(): IParsedType; | ||
/** | ||
* return true if this facet is inheritable | ||
*/ | ||
isInheritable(): boolean; | ||
/** | ||
* validates if the facet is configured properly | ||
* @param registry | ||
*/ | ||
validateSelf(registry: ITypeRegistry): IStatus; | ||
/** | ||
* returns value associated with the facet | ||
*/ | ||
value(): any; | ||
} | ||
export interface IParsedTypeCollection { | ||
/** | ||
* returns a type for a given name | ||
* @param name | ||
*/ | ||
getType(name: string): IParsedType; | ||
/** | ||
* adds a type to collection | ||
* @param t | ||
*/ | ||
add(t: IParsedType): void; | ||
/** | ||
* adds annotation type | ||
* @param t | ||
*/ | ||
addAnnotationType(t: IParsedType): void; | ||
/** | ||
* returns annotation type for a given name | ||
* @param name | ||
*/ | ||
getAnnotationType(name: string): IParsedType; | ||
/** | ||
* lists the types defined in this collection | ||
*/ | ||
types(): IParsedType[]; | ||
/** | ||
* lists annotation types defined in this collection | ||
*/ | ||
annotationTypes(): IParsedType[]; | ||
@@ -105,42 +37,11 @@ getTypeRegistry(): ITypeRegistry; | ||
export interface ITypeRegistry { | ||
/** | ||
* returns a type associated with a given name | ||
* @param name | ||
*/ | ||
get(name: string): IParsedType; | ||
/** | ||
* list all types stored in this registry | ||
*/ | ||
types(): IParsedType[]; | ||
} | ||
/** | ||
* parsed representation of the type | ||
* you should not create instances of this interfaces manually | ||
*/ | ||
export interface IParsedType { | ||
/** | ||
* returns list of directly declared sub types of this type | ||
*/ | ||
subTypes(): IParsedType[]; | ||
/** | ||
* returns list of directly declared super types of this type | ||
*/ | ||
superTypes(): IParsedType[]; | ||
/** | ||
* name of the type | ||
*/ | ||
name(): string; | ||
/** | ||
* returns full list of known types which inherit from this type. | ||
* Note: built-in types does not list their not built in sub types | ||
*/ | ||
allSubTypes(): IParsedType[]; | ||
/** | ||
* returns full list of ancestor types | ||
*/ | ||
allSuperTypes(): IParsedType[]; | ||
/** | ||
* validates a potential instance of type and returns a status describing the results of validation | ||
* @param i | ||
*/ | ||
validate(i: any, autoClose?: boolean): IStatus; | ||
@@ -150,195 +51,62 @@ validateType(reg?: ITypeRegistry): IStatus; | ||
canDoAc(i: any): IStatus; | ||
/** | ||
* returns all meta information and restrictions associated with the type all inheritable facets from super types are included | ||
*/ | ||
allFacets(): ITypeFacet[]; | ||
exampleObject(): any; | ||
/** | ||
* returns meta information and restrictions associated with the type only declared facets are included | ||
*/ | ||
declaredFacets(): ITypeFacet[]; | ||
/** | ||
* returns array of custom facets directly declared on this type | ||
*/ | ||
customFacets(): ITypeFacet[]; | ||
/** | ||
* returns array of custom facets directly declared on this type | ||
*/ | ||
restrictions(): ITypeFacet[]; | ||
/** | ||
* returns true if this type inherits from object type | ||
*/ | ||
isObject(): boolean; | ||
/** | ||
* returns true if this type inherits from string type | ||
*/ | ||
isString(): boolean; | ||
/** | ||
* returns true if this type inherits from number type | ||
*/ | ||
isNumber(): boolean; | ||
/** | ||
* returns true if this type inherits from array type | ||
*/ | ||
isArray(): boolean; | ||
/** | ||
* returns true if this type inherits from scalar type | ||
*/ | ||
isScalar(): boolean; | ||
/** | ||
* returns true if this type is a union type | ||
*/ | ||
isUnion(): boolean; | ||
/** | ||
* returns true if this type inhetits from an unknown type | ||
*/ | ||
isUnknown(): boolean; | ||
/** | ||
* return true if this type inherits from a file type | ||
*/ | ||
isFile(): boolean; | ||
/** | ||
* returns true if this type has recurrent definition; | ||
*/ | ||
isRecurrent(): boolean; | ||
} | ||
export interface Open { | ||
/** | ||
* this index signature is here to specify that IType can contain unknown user defined facets and annotations | ||
*/ | ||
[name: string]: any; | ||
} | ||
/** | ||
* this interface describes basic layout of JSON type representation, | ||
* sub interfaces contains documentation about important facets which can be specified for the types extended from related built-in types | ||
*/ | ||
export interface IType extends Open { | ||
/** | ||
* type expression describing super types or in case of multiple inheritance array of type expressions | ||
*/ | ||
type?: string | string[]; | ||
/** | ||
* default value for the type | ||
*/ | ||
default?: any; | ||
/** | ||
* example for the type | ||
*/ | ||
example?: any; | ||
/** | ||
* human readable description of the type (GitHub Markdown) | ||
*/ | ||
description?: string; | ||
/** | ||
* human readable short name of the type | ||
*/ | ||
displayName?: string; | ||
/** | ||
* map of custom facets declarations | ||
*/ | ||
facets?: { | ||
[name: string]: IType; | ||
}; | ||
/** | ||
* enumeration of possible valid instances for the type | ||
*/ | ||
enum?: any[]; | ||
} | ||
/** | ||
* this interface constains additional properties specific to object types | ||
*/ | ||
export interface ObjectType extends IType { | ||
/** | ||
* minimum amount of properties which instances of the type should have | ||
*/ | ||
minProperties?: number; | ||
/** | ||
* maximum amount of properties which instances of the type should have | ||
*/ | ||
maxProperties?: number; | ||
/** | ||
* if set to true type is threaten as closed type | ||
*/ | ||
closed?: boolean; | ||
/** | ||
* map of property signatures to the property declarations | ||
*/ | ||
properties?: { | ||
[name: string]: IType; | ||
}; | ||
/** | ||
* map of regular expressions to pattern property declarations | ||
*/ | ||
patternProperties?: { | ||
[name: string]: IType; | ||
}; | ||
/** | ||
* allows to set constraints on the type of additional properties | ||
*/ | ||
additionalProperties?: IType; | ||
} | ||
/** | ||
* this interface contains additional properties specific to array types | ||
*/ | ||
export interface ArrayType extends IType { | ||
/** | ||
* minimum amount of properties which instances of the type should have | ||
*/ | ||
minItems?: number; | ||
/** | ||
* maximum amount of properties which instances of the type should have | ||
*/ | ||
maxItems?: number; | ||
/** | ||
* contains description of the component type | ||
*/ | ||
items?: string | IType; | ||
} | ||
/** | ||
* this interface contains additional properties specific to number types | ||
*/ | ||
export interface NumberType extends IType { | ||
/** | ||
* minimum value for this type | ||
*/ | ||
minimum?: number; | ||
/** | ||
* maximum value for this type | ||
*/ | ||
maximim?: number; | ||
/** | ||
* value for multiple of constraint | ||
*/ | ||
multipleOf?: number; | ||
} | ||
/** | ||
* this interface contains additional properties specific to string types | ||
*/ | ||
export interface StringType extends IType { | ||
/** | ||
* regular expression which all instances of the type should pass | ||
*/ | ||
pattern?: string; | ||
/** | ||
* minimum length of the string | ||
*/ | ||
minLength?: number; | ||
/** | ||
* maximum length of the string | ||
*/ | ||
maxLength?: number; | ||
} | ||
/** | ||
* this interface represents JSON representation of the Library | ||
*/ | ||
export interface ITypeCollection { | ||
/** | ||
* map of annotation type name to annotation type description | ||
*/ | ||
annotationTypes?: { | ||
[name: string]: IType; | ||
}; | ||
/** | ||
* map of normal type name to type description | ||
*/ | ||
types?: { | ||
@@ -348,30 +116,6 @@ [name: string]: IType; | ||
} | ||
/** | ||
* loads type collection from JSON type definition | ||
* @param data | ||
* @param registry - optional registry of types which ar already known (does not modified during parse) | ||
* @returns {TypeCollection} returns a new instance of type collection with a parsed types | ||
*/ | ||
export declare function loadTypeCollection(data: ITypeCollection, registry?: ITypeRegistry): IParsedTypeCollection; | ||
/** | ||
* loads type from JSON type definition | ||
* @param data | ||
* @returns {ts.AbstractType} | ||
*/ | ||
export declare function loadType(data: IType): IParsedType; | ||
/** | ||
* parses a type or type collection definition from a JSON structure | ||
* @param data | ||
* @returns {any} | ||
*/ | ||
export declare function parse(data: IType | ITypeCollection): IParsedType | IParsedTypeCollection; | ||
/** | ||
* parses a type from a JSON structure, uses second argument to resolve types | ||
* @param data | ||
* @returns {any} | ||
*/ | ||
export declare function parseType(data: IType, collection: IParsedTypeCollection): IParsedType; | ||
/** | ||
* kind of the node | ||
*/ | ||
export declare enum NodeKind { | ||
@@ -382,124 +126,28 @@ SCALAR = 0, | ||
} | ||
/** | ||
* node representing an element of abstract syntax tree | ||
*/ | ||
export interface IParseNode { | ||
/** | ||
* node key | ||
*/ | ||
key(): string; | ||
/** | ||
* node value | ||
*/ | ||
value(): any; | ||
/** | ||
* node children | ||
*/ | ||
children(): IParseNode[]; | ||
/** | ||
* child with a given key | ||
* @param k | ||
*/ | ||
childWithKey(k: string): IParseNode; | ||
/** | ||
* kind of the node | ||
*/ | ||
kind(): NodeKind; | ||
} | ||
/** | ||
* parses type collection definition from a JSON structure | ||
* @param data | ||
* @returns {any} | ||
*/ | ||
export declare function parseFromAST(data: IParseNode): IParsedTypeCollection; | ||
/** | ||
* parses type collection definition from a JSON structure | ||
* @param data | ||
* @returns {any} | ||
*/ | ||
export declare function parseTypeFromAST(name: string, data: IParseNode, collection: IParsedTypeCollection, defaultsToAny?: boolean, annotation?: boolean): IParsedType; | ||
/** | ||
* dumps type or type collection to JSON | ||
* @param ts | ||
* @returns {IType|ITypeCollection} | ||
*/ | ||
export declare function dump(ts: IParsedType | IParsedTypeCollection): ITypeCollection | IType; | ||
/** | ||
* validates intance against the type definition | ||
* @param i - instance to validate | ||
* @param t - type definition | ||
* @returns {IStatus} | ||
*/ | ||
export declare function validate(i: any, t: IParsedType, autoClose?: boolean): IStatus; | ||
/*** | ||
* validates type definition | ||
* @param t | ||
* @param collection - collection of the types | ||
* @returns {IStatus} | ||
*/ | ||
export declare function validateTypeDefinition(t: IParsedType, collection: IParsedTypeCollection): IStatus; | ||
/** | ||
* performs automatic classification of instance against a given type | ||
* @param i | ||
* @param t | ||
* @returns {IParsedType} | ||
*/ | ||
export declare function performAC(i: any, t: IParsedType): IParsedType; | ||
/** | ||
* checks if the given type is suitable for automatic classification | ||
* @param t | ||
* @returns {Status} | ||
*/ | ||
export declare function checkACStatus(t: IParsedType): IStatus; | ||
export interface IFacetPrototype { | ||
/** | ||
*creates brand new instance of facet filled with default values | ||
*/ | ||
newInstance(): ITypeFacet; | ||
/** | ||
* creates a facet filled with a passed value | ||
* @param v | ||
*/ | ||
createWithValue(v: any): ITypeFacet; | ||
/** | ||
* checks if the facet represented by this prototype can be added to the given type | ||
* @param t | ||
*/ | ||
isApplicable(t: IParsedType): boolean; | ||
/** | ||
* returns true if this facet is inheritable | ||
*/ | ||
isInheritable(): boolean; | ||
/** | ||
* returns true if this facet is a constraint | ||
*/ | ||
isConstraint(): boolean; | ||
/** | ||
* returns true if this facet describes a metadata | ||
*/ | ||
isMeta(): boolean; | ||
/** | ||
* returns the name of the facet represented by this prototype | ||
*/ | ||
name(): string; | ||
} | ||
/** | ||
* this function allow you to get a list of all built-in facets | ||
* @returns {FacetPrototype[]} | ||
*/ | ||
export declare function builtInFacets(): IFacetPrototype[]; | ||
/** | ||
* returns type registry returning all built in types | ||
* @returns {TypeRegistry} | ||
*/ | ||
export declare function builtInTypes(): ITypeRegistry; | ||
/** | ||
* creates a new type by deriving it from a list of super types | ||
* @returns {IParsedType} | ||
*/ | ||
export declare function derive(name: string, ...types: IParsedType[]): IParsedType; | ||
/** | ||
* creates a new type by unifying it from a list of possible options | ||
* @returns {IParsedType} | ||
*/ | ||
export declare function unify(name: string, ...types: IParsedType[]): IParsedType; | ||
@@ -509,49 +157,9 @@ export declare class TypeConstructor { | ||
constructor(target: IParsedType); | ||
/** | ||
* adds property declaration to the type | ||
* @param name | ||
* @param type | ||
* @param optional | ||
* @returns {TypeConstructor} | ||
*/ | ||
addProperty(name: string, type: IParsedType, optional: boolean): TypeConstructor; | ||
/** | ||
* adds pattern property declaration to the type | ||
* @param target | ||
* @param regexp | ||
* @param type | ||
* @returns {TypeConstructor} | ||
*/ | ||
addPatternProperty(target: IParsedType, regexp: string, type: IParsedType): TypeConstructor; | ||
/** | ||
* closes type | ||
* @returns {TypeConstructor} | ||
*/ | ||
closeType(): TypeConstructor; | ||
/** | ||
* adds annotation to the type | ||
* @returns {TypeConstructor} | ||
*/ | ||
annotate(name: string, value: any): TypeConstructor; | ||
/** | ||
* adds custom facet to the type | ||
* @returns {TypeConstructor} | ||
*/ | ||
customFacet(name: string, value: any): TypeConstructor; | ||
/** | ||
* adds custom facet declaration to the type | ||
* @returns {TypeConstructor} | ||
*/ | ||
customFacetDeclaration(name: string, value: IParsedType, optional?: boolean): TypeConstructor; | ||
/** | ||
* adds a built-in facet with a given name and value | ||
* @param name | ||
* @param value | ||
* @returns {TypeConstructor} | ||
*/ | ||
addSimpleFacet(name: string, value: any): TypeConstructor; | ||
/** | ||
* returns a constructed type instance | ||
* @returns {IParsedType} | ||
*/ | ||
getResult(): IParsedType; | ||
@@ -558,0 +166,0 @@ } |
@@ -18,10 +18,3 @@ export interface INamedEntity { | ||
export interface IAnnotation extends INamedEntity, ITyped { | ||
/*** | ||
* names of the parameters that are specified here | ||
*/ | ||
parameterNames(): string[]; | ||
/** | ||
* value of the parameter with name | ||
* @param name | ||
*/ | ||
parameter(name: string): any; | ||
@@ -35,47 +28,10 @@ } | ||
export interface IExpandableExample { | ||
/** | ||
* Returns true if the application in question does not have an example set directly. | ||
* It is still possible that while application has no direct example, references may have | ||
* example pieces, current example may be expanded with. | ||
*/ | ||
isEmpty(): boolean; | ||
/** | ||
* Whether the original example is JSON string. | ||
*/ | ||
isJSONString(): boolean; | ||
/** | ||
* Whether the original example is XML string. | ||
*/ | ||
isXMLString(): boolean; | ||
/** | ||
* Whether original example is set up as YAML. | ||
*/ | ||
isYAML(): boolean; | ||
/** | ||
* Returns representation of this example as a string. | ||
* This method works for any type of example. | ||
*/ | ||
asString(): string; | ||
/** | ||
* Returns representation of this example as JSON object. | ||
* This works for examples being JSON strings and YAML objects. | ||
* It -may- work for XML string examples, but is not guaranteed. | ||
*/ | ||
asJSON(): any; | ||
/** | ||
* Returns an original example. It is string for XML and JSON strings, | ||
* or JSON object for YAML example. | ||
*/ | ||
original(): any; | ||
/** | ||
* Expands the example with what its application references can provide. | ||
* XML examples are not guaranteed to be supported. If supported, XML is convrted into JSON. | ||
* Returns null or expansion result as string. | ||
*/ | ||
expandAsString(): string; | ||
/** | ||
* Expands the example with what its application references can provide. | ||
* XML examples are not guaranteed to be supported. If supported, XML is convrted into JSON. | ||
* Returns null or expansion result as JSON object. | ||
*/ | ||
expandAsJSON(): any; | ||
@@ -86,7 +42,2 @@ } | ||
value: string; | ||
/** | ||
* | ||
* @param name name of the property to discriminate | ||
* @param value expected value of discriminating property | ||
*/ | ||
constructor(name: string, value: string); | ||
@@ -96,163 +47,39 @@ } | ||
key(): NamedId; | ||
/** | ||
* list os super types | ||
*/ | ||
superTypes(): ITypeDefinition[]; | ||
/** | ||
* list of sub types | ||
*/ | ||
subTypes(): ITypeDefinition[]; | ||
/** | ||
* list of all subtypes not including this type | ||
*/ | ||
allSubTypes(): ITypeDefinition[]; | ||
/** | ||
* List of all super types not including this type | ||
*/ | ||
allSuperTypes(): ITypeDefinition[]; | ||
/** | ||
* Propertis decared in this type | ||
*/ | ||
properties(): IProperty[]; | ||
facet(n: string): IProperty; | ||
/** | ||
* List off all properties (declared in this type and super types), | ||
* did not includes properties fixed to fixed facet use facet for them | ||
*/ | ||
allProperties(visited?: any): IProperty[]; | ||
/** | ||
* Facets declared by the type and its supertypes | ||
*/ | ||
allFacets(visited?: any): IProperty[]; | ||
/** | ||
* Facets declared by the type | ||
*/ | ||
facets(): IProperty[]; | ||
/** | ||
* Whether this type is value type. Does not perform a search in super types. | ||
*/ | ||
isValueType(): boolean; | ||
/** | ||
* true if this type is value type or one of its super types is value type. | ||
*/ | ||
hasValueTypeInHierarchy(): boolean; | ||
/** | ||
* Whether this type is an array. Does not perform a search in super types. | ||
*/ | ||
isArray(): boolean; | ||
/** | ||
* Whether this type is object. Performs a search in super types. | ||
*/ | ||
isObject(): boolean; | ||
/** | ||
* true if this type is array or one of its super types is array. | ||
*/ | ||
hasArrayInHierarchy(): boolean; | ||
/** | ||
* Casts this type to an array. Does not perform a search in super types. | ||
*/ | ||
array(): IArrayType; | ||
/** | ||
* casting to nearest array type in hierarchy | ||
*/ | ||
arrayInHierarchy(): IArrayType; | ||
/** | ||
* Whether this type is a union. Does not perform a search in super types. | ||
*/ | ||
isUnion(): boolean; | ||
/** | ||
* true if this type is union or one of its super types is union. | ||
*/ | ||
hasUnionInHierarchy(): boolean; | ||
/** | ||
* Casts this type to a union type. Does not perform a search in super types. | ||
*/ | ||
union(): IUnionType; | ||
/** | ||
* Casting to nearest union type in hierarchy | ||
*/ | ||
unionInHierarchy(): IUnionType; | ||
isAnnotationType(): boolean; | ||
annotationType(): IAnnotationType; | ||
/** | ||
* true if this type values have internal structure | ||
*/ | ||
hasStructure(): boolean; | ||
/** | ||
* true if this type is external. Does not perform a search in super types. | ||
*/ | ||
isExternal(): boolean; | ||
/** | ||
* true if this type is external type, or one if its super types is an external type. | ||
*/ | ||
hasExternalInHierarchy(): boolean; | ||
/** | ||
* Casts this type to an external type. Does not perform a search in super types. | ||
*/ | ||
external(): IExternalType; | ||
/** | ||
* Casting to nearest external type in hierarchy | ||
*/ | ||
externalInHierarchy(): IExternalType; | ||
/** | ||
* List of value requirements for this type, | ||
* used to discriminate a type from a list of subtype | ||
*/ | ||
valueRequirements(): ValueRequirement[]; | ||
/** | ||
* parent universe | ||
*/ | ||
universe(): IUniverse; | ||
/** | ||
* return true if this type is assignable to a given type | ||
* @param typeName | ||
*/ | ||
isAssignableFrom(typeName: string): boolean; | ||
/** | ||
* return property by it name looks in super classes | ||
* but will not return anything if property is a fixed with facet | ||
* @param name | ||
*/ | ||
property(name: string): IProperty; | ||
/** | ||
* helper method to get required properties only | ||
*/ | ||
requiredProperties(): IProperty[]; | ||
/** | ||
* @return map of fixed facet names to fixed facet values; | ||
*/ | ||
getFixedFacets(): { | ||
[name: string]: any; | ||
}; | ||
/** | ||
* @return map of fixed facet names to fixed facet values; | ||
*/ | ||
allFixedFacets(): { | ||
[name: string]: any; | ||
}; | ||
/** | ||
* Print details of this type. | ||
* Used mostly for debug and demosntration purposes. | ||
* @param indent | ||
*/ | ||
printDetails(indent?: string, settings?: IPrintDetailsSettings): string; | ||
/** | ||
* Returns examples for this type. | ||
* Returned examples should be tested for being empty and being expandable. | ||
*/ | ||
examples(): IExpandableExample[]; | ||
/** | ||
* Returns whether this type contain genuine user defined type in its hierarchy. | ||
* Genuine user defined type is a type user intentionally defined and filled with | ||
* properties or facets, or having user-defined name as opposed to a synthetic user-defined type. | ||
*/ | ||
isGenuineUserDefinedType(): boolean; | ||
/** | ||
* Returns nearest genuine user-define type in the hierarchy. | ||
* Genuine user defined type is a type user intentionally defined and filled with | ||
* properties or facets, or having user-defined name as opposed to a synthetic user-defined type. | ||
*/ | ||
genuineUserDefinedType(): ITypeDefinition; | ||
kind(): string[]; | ||
} | ||
@@ -265,5 +92,2 @@ export interface FacetValidator { | ||
} | ||
/** | ||
* represent array types | ||
*/ | ||
export interface IArrayType extends ITypeDefinition { | ||
@@ -275,5 +99,2 @@ componentType(): ITypeDefinition; | ||
} | ||
/** | ||
* represent union types | ||
*/ | ||
export interface IUnionType extends ITypeDefinition { | ||
@@ -283,22 +104,6 @@ leftType(): ITypeDefinition; | ||
} | ||
/** | ||
* collection of types | ||
*/ | ||
export interface IUniverse { | ||
/** | ||
* type for a given name | ||
* @param name | ||
*/ | ||
type(name: string): ITypeDefinition; | ||
/** | ||
* version of this universe | ||
*/ | ||
version(): string; | ||
/** | ||
* All types in universe | ||
*/ | ||
types(): ITypeDefinition[]; | ||
/** | ||
* highlevel information about universe | ||
*/ | ||
matched(): { | ||
@@ -309,55 +114,14 @@ [name: string]: NamedId; | ||
export interface IProperty extends INamedEntity { | ||
/** | ||
* name of the property | ||
*/ | ||
nameId(): string; | ||
/** | ||
* returns true if this property matches the a given property name | ||
* (it is important for additional and pattern properties) | ||
* @param k | ||
*/ | ||
matchKey(k: string): boolean; | ||
/** | ||
* range of the property (basically it is type) | ||
*/ | ||
range(): ITypeDefinition; | ||
/** | ||
* domain of the property (basically declaring type) | ||
*/ | ||
domain(): ITypeDefinition; | ||
/** | ||
* true if this property is required to fill | ||
*/ | ||
isRequired(): boolean; | ||
/** | ||
* true if this property can have multiple values | ||
*/ | ||
isMultiValue(): boolean; | ||
/** | ||
* true if this property range is one of built in value types | ||
*/ | ||
isPrimitive(): boolean; | ||
/** | ||
* true if this property range is a value type | ||
*/ | ||
isValueProperty(): boolean; | ||
/** | ||
* return a prefix for a property name - used for additional properties | ||
*/ | ||
keyPrefix(): string; | ||
/** | ||
* return a pattern for a property name - used for a pattern properties | ||
*/ | ||
getKeyRegexp(): string; | ||
/** | ||
* returns a default value for this property | ||
*/ | ||
defaultValue(): any; | ||
/** | ||
* if this property range is constrained to a fixed set of values it will return the values | ||
*/ | ||
enumOptions(): string[]; | ||
/** | ||
* true if this property is a discriminator | ||
*/ | ||
isDescriminator(): boolean; | ||
@@ -364,0 +128,0 @@ } |
@@ -70,3 +70,2 @@ import ti = require("./nominal-interfaces"); | ||
}): IProperty[]; | ||
facets(): IProperty[]; | ||
facet(name: string): ti.IProperty; | ||
@@ -100,5 +99,2 @@ typeId(): string; | ||
}; | ||
allFixedFacets(): { | ||
[name: string]: any; | ||
}; | ||
protected contributeFacets(x: { | ||
@@ -127,18 +123,4 @@ [name: string]: any; | ||
private isStandardSuperclass(nameId, className); | ||
/** | ||
* Returns example for this type. | ||
* Returned example should be tested for being empty and being expandable. | ||
*/ | ||
examples(): IExpandableExample[]; | ||
/** | ||
* Returns whether this type contain genuine user defined type in its hierarchy. | ||
* Genuine user defined type is a type user intentionally defined and filled with | ||
* properties or facets, or having user-defined name as opposed to a synthetic user-defined type. | ||
*/ | ||
isGenuineUserDefinedType(): boolean; | ||
/** | ||
* Returns nearest genuine user-define type in the hierarchy. | ||
* Genuine user defined type is a type user intentionally defined and filled with | ||
* properties or facets, or having user-defined name as opposed to a synthetic user-defined type. | ||
*/ | ||
genuineUserDefinedType(): ITypeDefinition; | ||
@@ -155,6 +137,4 @@ customProperties(): IProperty[]; | ||
isArray(): boolean; | ||
isObject(): boolean; | ||
array(): IArrayType; | ||
isValueType(): boolean; | ||
kind(): string[]; | ||
} | ||
@@ -167,3 +147,2 @@ export declare class ValueType extends AbstractType implements ITypeDefinition { | ||
isUnionType(): boolean; | ||
isObject(): boolean; | ||
} | ||
@@ -230,3 +209,2 @@ export declare class StructuredType extends AbstractType implements ITypeDefinition { | ||
isUnion(): boolean; | ||
isObject(): boolean; | ||
hasArrayInHierarchy(): boolean; | ||
@@ -239,3 +217,2 @@ } | ||
isArray(): boolean; | ||
isObject(): boolean; | ||
arrayInHierarchy(): this; | ||
@@ -242,0 +219,0 @@ array(): this; |
@@ -71,14 +71,3 @@ import ts = require("./typesystem"); | ||
export declare function toProto(type: AbstractType): TypeProto; | ||
/*** | ||
* stores a type to JSON structure | ||
* @param ts | ||
*/ | ||
export declare function storeAsJSON(ts: AbstractType | TypeCollection): any; | ||
/** | ||
* parses a type from a JSON structure | ||
* @param name | ||
* @param n | ||
* @param r | ||
* @returns {any} | ||
*/ | ||
export declare function parse(name: string, n: ParseNode, r?: ts.TypeRegistry, defaultsToAny?: boolean, annotation?: boolean): ts.AbstractType; |
@@ -327,2 +327,9 @@ "use strict"; | ||
result.id = name; | ||
var rs = n.childWithKey("required"); | ||
if (rs) { | ||
if (rs.value() == false) { | ||
result.optional = true; | ||
result.id = n.key(); | ||
} | ||
} | ||
return result; | ||
@@ -329,0 +336,0 @@ } |
@@ -7,5 +7,2 @@ /// <reference path="../../typings/main.d.ts" /> | ||
export declare type IValidationPath = ts.IValidationPath; | ||
/** | ||
* this class is an abstract super type for every constraint that can select properties from objects | ||
*/ | ||
export declare abstract class MatchesProperty extends ts.Constraint { | ||
@@ -30,5 +27,2 @@ private _type; | ||
} | ||
/** | ||
* this is a constraint which checks that object has no unknown properties if at has not additional properties | ||
*/ | ||
export declare class KnownPropertyRestriction extends ts.Constraint { | ||
@@ -44,5 +38,2 @@ private _value; | ||
} | ||
/** | ||
* this constaint checks that object has a particular property | ||
*/ | ||
export declare class HasProperty extends ts.Constraint { | ||
@@ -57,5 +48,2 @@ private name; | ||
} | ||
/** | ||
* this constraint checks that property has a particular tyoe if exists | ||
*/ | ||
export declare class PropertyIs extends MatchesProperty { | ||
@@ -74,5 +62,2 @@ private name; | ||
} | ||
/** | ||
* this cosnstraint checks that map property values passes to particular type if exists | ||
*/ | ||
export declare class MapPropertyIs extends MatchesProperty { | ||
@@ -93,5 +78,2 @@ private regexp; | ||
} | ||
/** | ||
* this constraint tests that additional property | ||
*/ | ||
export declare class AdditionalPropertyIs extends MatchesProperty { | ||
@@ -109,5 +91,2 @@ private type; | ||
} | ||
/** | ||
* common super type for a simple restrictions | ||
*/ | ||
export declare abstract class FacetRestriction<T> extends ts.Constraint { | ||
@@ -120,5 +99,2 @@ abstract facetName(): string; | ||
} | ||
/** | ||
* abstract super type for every min max restriction | ||
*/ | ||
export declare abstract class MinMaxRestriction extends FacetRestriction<Number> { | ||
@@ -144,5 +120,2 @@ private _facetName; | ||
} | ||
/** | ||
* maximum constraint | ||
*/ | ||
export declare class Maximum extends MinMaxRestriction { | ||
@@ -153,5 +126,2 @@ constructor(val: number); | ||
} | ||
/** | ||
* minimum constraint | ||
*/ | ||
export declare class Minimum extends MinMaxRestriction { | ||
@@ -162,5 +132,2 @@ constructor(val: number); | ||
} | ||
/** | ||
* max items cosntraint | ||
*/ | ||
export declare class MaxItems extends MinMaxRestriction { | ||
@@ -171,5 +138,2 @@ constructor(val: number); | ||
} | ||
/** | ||
* min items cosntraint | ||
*/ | ||
export declare class MinItems extends MinMaxRestriction { | ||
@@ -180,5 +144,2 @@ constructor(val: number); | ||
} | ||
/** | ||
* max length | ||
*/ | ||
export declare class MaxLength extends MinMaxRestriction { | ||
@@ -189,5 +150,2 @@ constructor(val: number); | ||
} | ||
/** | ||
* min length | ||
*/ | ||
export declare class MinLength extends MinMaxRestriction { | ||
@@ -198,5 +156,2 @@ constructor(val: number); | ||
} | ||
/** | ||
* max properties constraint | ||
*/ | ||
export declare class MaxProperties extends MinMaxRestriction { | ||
@@ -207,5 +162,2 @@ constructor(val: number); | ||
} | ||
/** | ||
* min properties constraint | ||
*/ | ||
export declare class MinProperties extends MinMaxRestriction { | ||
@@ -216,5 +168,2 @@ constructor(val: number); | ||
} | ||
/** | ||
* unique items constraint | ||
*/ | ||
export declare class UniqueItems extends FacetRestriction<boolean> { | ||
@@ -231,5 +180,2 @@ private _value; | ||
} | ||
/** | ||
* components of array should be of type | ||
*/ | ||
export declare class ComponentShouldBeOfType extends FacetRestriction<ts.AbstractType> { | ||
@@ -247,5 +193,2 @@ private type; | ||
} | ||
/** | ||
* regular expression (pattern) constraint | ||
*/ | ||
export declare class Pattern extends FacetRestriction<string> { | ||
@@ -262,5 +205,2 @@ private _value; | ||
} | ||
/** | ||
* enum constraint | ||
*/ | ||
export declare class Enum extends FacetRestriction<string[]> { | ||
@@ -278,7 +218,2 @@ private _value; | ||
} | ||
/** | ||
* this function attempts to optimize to set of restrictions | ||
* @param r | ||
* @returns {ts.Constraint[]} | ||
*/ | ||
export declare function optimize(r: ts.Constraint[]): ts.Constraint[]; |
@@ -56,25 +56,8 @@ /// <reference path="../../typings/main.d.ts" /> | ||
nothing(c: Constraint, message?: string): NothingRestrictionWithLocation; | ||
/** | ||
* inner implementation of compute composed restriction from this and parameter restriction | ||
* @param restriction | ||
* @return composed restriction or null; | ||
*/ | ||
composeWith(r: Constraint): Constraint; | ||
/** | ||
* returns optimized restiction or this | ||
* @returns {Constraint} | ||
*/ | ||
preoptimize(): Constraint; | ||
protected innerOptimize(): Constraint; | ||
/** | ||
* performs attempt to compute composed restriction from this and parameter restriction | ||
* @param restriction | ||
* @return composed restriction or null; | ||
*/ | ||
tryCompose(r: Constraint): Constraint; | ||
} | ||
export declare var autoCloseFlag: boolean; | ||
/** | ||
* Registry of the types | ||
*/ | ||
export declare class TypeRegistry { | ||
@@ -122,9 +105,3 @@ private _parent; | ||
name(): string; | ||
/** | ||
* @return directly known sub types of a given type | ||
*/ | ||
subTypes(): AbstractType[]; | ||
/** | ||
* @return directly known super types of a given type | ||
*/ | ||
superTypes(): AbstractType[]; | ||
@@ -141,102 +118,26 @@ validateType(tr?: TypeRegistry): Status; | ||
inherit(name: string): InheritedType; | ||
/** | ||
* | ||
* @return true if type is an inplace type and has no name | ||
*/ | ||
isAnonymous(): boolean; | ||
/** | ||
* | ||
* @return true if type has no associated meta information of restrictions | ||
*/ | ||
isEmpty(): boolean; | ||
/** | ||
* | ||
* @return true if type is an array or extends from an array | ||
*/ | ||
isArray(): boolean; | ||
propertySet(): string[]; | ||
checkConfluent(): Status; | ||
/** | ||
* | ||
* @return true if type is object or inherited from object | ||
*/ | ||
isObject(): boolean; | ||
/** | ||
* | ||
* @return true if type is object or inherited from object | ||
*/ | ||
isExternal(): boolean; | ||
/** | ||
* | ||
* @return true if type is an boolean type or extends from boolean | ||
*/ | ||
isBoolean(): boolean; | ||
/** | ||
* | ||
* @return true if type is string or inherited from string | ||
*/ | ||
isString(): boolean; | ||
/** | ||
* | ||
* @return true if type is number or inherited from number | ||
*/ | ||
isNumber(): boolean; | ||
/** | ||
* | ||
* @return true if type is number or inherited from number | ||
*/ | ||
isFile(): boolean; | ||
/** | ||
* | ||
* @return true if type is scalar or inherited from scalar | ||
*/ | ||
isScalar(): boolean; | ||
/** | ||
* | ||
* @return true if type is scalar or inherited from scalar | ||
*/ | ||
isUnknown(): boolean; | ||
/** | ||
* | ||
* @return true if type is scalar or inherited from scalar | ||
*/ | ||
isRecurrent(): boolean; | ||
/** | ||
* | ||
* @return true if type is an built-in type | ||
*/ | ||
isBuiltin(): boolean; | ||
exampleObject(): any; | ||
/** | ||
* | ||
* @return true if type is an polymorphic type | ||
*/ | ||
isPolymorphic(): boolean; | ||
/** | ||
* @return all restrictions associated with type | ||
*/ | ||
restrictions(forValidation?: boolean): Constraint[]; | ||
customFacets(): TypeInformation[]; | ||
isUnion(): boolean; | ||
/** | ||
* return all type information associated with type | ||
*/ | ||
meta(): TypeInformation[]; | ||
/** | ||
* validates object against this type without performing AC | ||
*/ | ||
validateDirect(i: any, autoClose?: boolean, nullAllowed?: boolean, path?: IValidationPath): Status; | ||
validate(i: any, autoClose?: boolean, nullAllowed?: boolean): Status; | ||
/** | ||
* declares a pattern property on this type, | ||
* note if type is not inherited from an object type this will move | ||
* type to inconsistent state | ||
* @param name - regexp | ||
* @param type - type of the property | ||
* @return | ||
*/ | ||
declareMapProperty(name: string, type: AbstractType): AbstractType; | ||
/** | ||
* make this type closed type (no unknown properties any more) | ||
*/ | ||
closeUnknownProperties(): void; | ||
@@ -246,31 +147,8 @@ canDoAc(): Status; | ||
checkDiscriminator(t1: AbstractType, t2: AbstractType): Status; | ||
/** | ||
* performs automatic classification of the instance | ||
* @param obj | ||
* @returns {AbstractType} | ||
*/ | ||
ac(obj: any): AbstractType; | ||
/** | ||
* adds new property declaration to this type, note if type is not inherited from an object type this will move | ||
* type to inconsistent state | ||
* @param name - name of the property | ||
* @param type - type of the property | ||
* @param optional true if property is optinal | ||
* @return the type with property (this) | ||
*/ | ||
declareProperty(name: string, t: AbstractType, optional: boolean): AbstractType; | ||
private discriminate(obj, opt); | ||
/** | ||
* return instance of type information of particular class | ||
* @param clazz | ||
* @returns {any} | ||
*/ | ||
oneMeta<T>(clazz: { | ||
new (v: any): T; | ||
}): T; | ||
/** | ||
* return all instances of meta information of particular class | ||
* @param clazz | ||
* @returns {any} | ||
*/ | ||
metaOfType<T>(clazz: { | ||
@@ -315,6 +193,2 @@ new (v: any): T; | ||
constructor(name: string, _options: AbstractType[]); | ||
/** | ||
* | ||
* @returns all possible options | ||
*/ | ||
allOptions(): AbstractType[]; | ||
@@ -338,14 +212,3 @@ options(): AbstractType[]; | ||
export declare function intersect(name: string, t: AbstractType[]): IntersectionType; | ||
/** | ||
* allows you to extend a type from other types | ||
* @param name | ||
* @param t | ||
* @returns {InheritedType} | ||
*/ | ||
export declare function derive(name: string, t: AbstractType[]): InheritedType; | ||
/** | ||
* this function allows you to quickly derive a new type from object; | ||
* @param name | ||
* @returns {InheritedType} | ||
*/ | ||
export declare function deriveObjectType(name: string): InheritedType; | ||
@@ -420,6 +283,2 @@ export declare class NothingRestriction extends Constraint { | ||
} | ||
/*** | ||
* | ||
* lets declare built in types | ||
*/ | ||
export declare const ANY: RootType; | ||
@@ -426,0 +285,0 @@ export declare const SCALAR: InheritedType; |
@@ -1554,2 +1554,3 @@ "use strict"; | ||
exports.NUMBER.addMeta(new TypeOfRestriction("number")); | ||
exports.NUMBER.addMeta(new metainfo_1.FacetDeclaration("format", exports.STRING, true)); | ||
exports.BOOLEAN.addMeta(new TypeOfRestriction("boolean")); | ||
@@ -1562,2 +1563,7 @@ exports.OBJECT.addMeta(new TypeOfRestriction("object")); | ||
exports.FILE.addMeta(new TypeOfRestriction("string")); | ||
var arrayOfString = exports.ARRAY.inherit(""); | ||
arrayOfString.addMeta(new restrictions_3.ComponentShouldBeOfType(exports.STRING)); | ||
exports.FILE.addMeta(new metainfo_1.FacetDeclaration("fileTypes", arrayOfString, true)); | ||
exports.FILE.addMeta(new metainfo_1.FacetDeclaration("minLength", exports.INTEGER, true)); | ||
exports.FILE.addMeta(new metainfo_1.FacetDeclaration("maxLength", exports.INTEGER, true)); | ||
exports.SCALAR.addMeta(new ScalarRestriction()); | ||
@@ -1564,0 +1570,0 @@ registry.types().forEach(function (x) { return x.lock(); }); |
@@ -250,3 +250,63 @@ "use strict"; | ||
}); | ||
it("Valid example of format property", function () { | ||
var tp = ps.parseJSONTypeCollection({ | ||
types: { | ||
a: { | ||
type: "number", | ||
format: "int16" | ||
} | ||
} | ||
}); | ||
var t = tp.getType("a"); | ||
var st = t.validateType(ts.builtInRegistry()); | ||
assert.isTrue(st.getErrors().length === 0); | ||
}); | ||
it("Valid example of not using format property", function () { | ||
var tp = ps.parseJSONTypeCollection({ | ||
types: { | ||
a: { | ||
type: "number", | ||
} | ||
} | ||
}); | ||
var t = tp.getType("a"); | ||
var st = t.validateType(ts.builtInRegistry()); | ||
assert.isTrue(st.getErrors().length === 0); | ||
}); | ||
it("File related facets", function () { | ||
var tp = ps.parseJSONTypeCollection({ | ||
types: { | ||
a: { | ||
type: "file", | ||
fileTypes: ["applicaiton/json"], | ||
minLength: 1, | ||
maxLength: 2000 | ||
} | ||
} | ||
}); | ||
var t = tp.getType("a"); | ||
var st = t.validateType(ts.builtInRegistry()); | ||
assert.isTrue(st.getErrors().length === 0); | ||
}); | ||
it("not required property in long syntax", function () { | ||
var tp = ps.parseJSONTypeCollection({ | ||
types: { | ||
a: { | ||
"type": "object", | ||
properties: { | ||
x: "string", | ||
y: { | ||
type: "string", | ||
required: false | ||
} | ||
}, | ||
example: { x: "A" } | ||
} | ||
} | ||
}); | ||
var t = tp.getType("a"); | ||
var st = t.validateType(ts.builtInRegistry()); | ||
assert.isTrue(st.getErrors().length === 0); | ||
}); | ||
}); | ||
//# sourceMappingURL=regressionTests.js.map |
{ | ||
"name": "raml-typesystem", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"main": "dist/src/index.js", | ||
"scripts": { | ||
"test-cov": " ./node_modules/.bin/istanbul cover _mocha dist/tests/*Tests.js", | ||
"build": "rm -rf dist/ && ./node_modules/typescript/bin/tsc ", | ||
"build": "rimraf dist && tsc", | ||
"pullall" : "dev-env-installer pullall", | ||
@@ -44,4 +44,5 @@ "buildall" : "dev-env-installer buildall", | ||
"typings": "^0.5.1", | ||
"dev-env-installer":"^0.0.2" | ||
"dev-env-installer":"^0.0.2", | ||
"rimraf":"*" | ||
} | ||
} |
# RAML Data Type System | ||
[![Build Status](https://travis-ci.org/raml-org/typesystem-ts.svg?branch=master)](https://travis-ci.org/raml-org/typesystem-ts) | ||
This module contains a lightweight implementation of the type system that was introduced with [RAML 1.0](http://raml.org). | ||
@@ -4,0 +6,0 @@ |
@@ -355,2 +355,9 @@ import ts=require("./typesystem") | ||
result.id=name; | ||
var rs=n.childWithKey("required"); | ||
if (rs){ | ||
if (rs.value()==false){ | ||
result.optional=true; | ||
result.id=n.key(); | ||
} | ||
} | ||
return result; | ||
@@ -357,0 +364,0 @@ } |
@@ -1640,2 +1640,3 @@ /// <reference path="../typings/main.d.ts" /> | ||
NUMBER.addMeta(new TypeOfRestriction("number")); | ||
NUMBER.addMeta(new FacetDeclaration("format",STRING,true)); | ||
BOOLEAN.addMeta(new TypeOfRestriction("boolean")); | ||
@@ -1648,6 +1649,11 @@ OBJECT.addMeta(new TypeOfRestriction("object")); | ||
FILE.addMeta(new TypeOfRestriction("string")); | ||
var arrayOfString=ARRAY.inherit(""); | ||
arrayOfString.addMeta(new ComponentShouldBeOfType(STRING)) | ||
FILE.addMeta(new FacetDeclaration("fileTypes",arrayOfString,true)); | ||
FILE.addMeta(new FacetDeclaration("minLength",INTEGER,true)); | ||
FILE.addMeta(new FacetDeclaration("maxLength",INTEGER,true)); | ||
SCALAR.addMeta(new ScalarRestriction()); | ||
registry.types().forEach(x=>x.lock()) | ||
export class ExternalType extends InheritedType{ | ||
@@ -1654,0 +1660,0 @@ constructor( name: string,private _content:string,private json:boolean, private provider: su.IContentProvider){ |
@@ -296,2 +296,71 @@ import ps= require("./actualParse") | ||
}); | ||
it("Valid example of format property", function () { | ||
var tp = ps.parseJSONTypeCollection({ | ||
types:{ | ||
a: { | ||
type:"number", | ||
format: "int16" | ||
} | ||
} | ||
}); | ||
var t=tp.getType("a"); | ||
var st=t.validateType(ts.builtInRegistry()); | ||
assert.isTrue(st.getErrors().length===0); | ||
}); | ||
it("Valid example of not using format property", function () { | ||
var tp = ps.parseJSONTypeCollection({ | ||
types:{ | ||
a: { | ||
type:"number", | ||
} | ||
} | ||
}); | ||
var t=tp.getType("a"); | ||
var st=t.validateType(ts.builtInRegistry()); | ||
assert.isTrue(st.getErrors().length===0); | ||
}); | ||
it("File related facets", function () { | ||
var tp = ps.parseJSONTypeCollection({ | ||
types:{ | ||
a: { | ||
type:"file", | ||
fileTypes:["applicaiton/json"], | ||
minLength:1, | ||
maxLength:2000 | ||
} | ||
} | ||
}); | ||
var t=tp.getType("a"); | ||
var st=t.validateType(ts.builtInRegistry()); | ||
assert.isTrue(st.getErrors().length===0); | ||
}); | ||
it("not required property in long syntax", function () { | ||
var tp = ps.parseJSONTypeCollection({ | ||
types:{ | ||
a: { | ||
"type":"object", | ||
properties:{ | ||
x:"string", | ||
y:{ | ||
type:"string", | ||
required: false | ||
} | ||
}, | ||
example: {x:"A"} | ||
} | ||
} | ||
}); | ||
var t=tp.getType("a"); | ||
var st=t.validateType(ts.builtInRegistry()); | ||
assert.isTrue(st.getErrors().length===0); | ||
}); | ||
}); |
@@ -1,2 +0,2 @@ | ||
// Compiled using typings@0.6.10 | ||
// Compiled using typings@0.6.8 | ||
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/be0b6b394f77a59e192ad7cfec18078706e44db5/chai/chai.d.ts | ||
@@ -3,0 +3,0 @@ // Type definitions for chai 2.0.0 |
@@ -1,2 +0,2 @@ | ||
// Compiled using typings@0.6.10 | ||
// Compiled using typings@0.6.8 | ||
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/mocha/mocha.d.ts | ||
@@ -3,0 +3,0 @@ // Type definitions for mocha 2.2.5 |
@@ -1,2 +0,2 @@ | ||
// Compiled using typings@0.6.10 | ||
// Compiled using typings@0.6.8 | ||
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7304e0770d53762f89af7fcf14517d5f45a04cc2/xml2js/xml2js.d.ts | ||
@@ -3,0 +3,0 @@ // Type definitions for node-xml2js |
@@ -1,2 +0,2 @@ | ||
// Compiled using typings@0.6.10 | ||
// Compiled using typings@0.6.8 | ||
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/be0b6b394f77a59e192ad7cfec18078706e44db5/chai/chai.d.ts | ||
@@ -3,0 +3,0 @@ // Type definitions for chai 2.0.0 |
@@ -1,2 +0,2 @@ | ||
// Compiled using typings@0.6.10 | ||
// Compiled using typings@0.6.8 | ||
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/mocha/mocha.d.ts | ||
@@ -3,0 +3,0 @@ // Type definitions for mocha 2.2.5 |
@@ -1,2 +0,2 @@ | ||
// Compiled using typings@0.6.10 | ||
// Compiled using typings@0.6.8 | ||
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7304e0770d53762f89af7fcf14517d5f45a04cc2/xml2js/xml2js.d.ts | ||
@@ -3,0 +3,0 @@ // Type definitions for node-xml2js |
@@ -6,3 +6,2 @@ { | ||
"gitUrl" : "https://github.com/raml-org/raml-js-parser-2.git", | ||
"gitBranch" : "code", | ||
"installTypings" : true | ||
@@ -29,3 +28,8 @@ }, | ||
"gitUrl" : "https://github.com/mulesoft-labs/yaml-ast-parser.git" | ||
}, | ||
"ts-model" : { | ||
"build" : "npm run build", | ||
"gitUrl" : "https://github.com/mulesoft-labs/ts-model.git", | ||
"installTypings" : true | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88
1492765
11
34025