Comparing version 1.6.1 to 1.6.2
@@ -64,2 +64,3 @@ import { Type } from './type'; | ||
export interface IExpressions { | ||
model: IModelManager; | ||
get enums(): [string, [string, any][]][]; | ||
@@ -66,0 +67,0 @@ get formats(): [string, Format][]; |
@@ -1,6 +0,5 @@ | ||
import { Operand, IModelManager, Type, Parameter, ITypeManager, OperatorMetadata } from '../contract'; | ||
import { Operand, IModelManager, Type, ITypeManager, OperatorMetadata } from '../contract'; | ||
export declare class TypeManager implements ITypeManager { | ||
protected readonly model: IModelManager; | ||
constructor(model: IModelManager); | ||
parameters(operand: Operand): Parameter[]; | ||
type(operand: Operand): Type; | ||
@@ -7,0 +6,0 @@ protected solveType(operand: Operand): void; |
@@ -22,16 +22,2 @@ "use strict"; | ||
// indeterminate: any | ||
parameters(operand) { | ||
const parameters = []; | ||
if (operand.type === contract_1.OperandType.Var) { | ||
parameters.push({ name: operand.name, type: contract_1.Type.toString(operand.returnType) }); | ||
} | ||
for (const child of operand.children) { | ||
const childParameters = this.parameters(child); | ||
const newParameters = childParameters.filter((p) => !parameters.map((p) => p.name).includes(p.name)); | ||
if (newParameters.length > 0) { | ||
parameters.push(...newParameters); | ||
} | ||
} | ||
return parameters; | ||
} | ||
type(operand) { | ||
@@ -38,0 +24,0 @@ this.solveType(operand); |
{ | ||
"name": "3xpr", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"description": "expressions", | ||
@@ -5,0 +5,0 @@ "author": "Flavio Lionel Rita <flaviolrita@hotmail.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
535806
6299