@code0-tech/triangulum 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/extraction/getTypeFromValue.d.ts +1 -1
- package/dist/extraction/getTypeVariant.d.ts +3 -2
- package/dist/extraction/getTypesFromNode.d.ts +1 -1
- package/dist/extraction/getValueFromType.d.ts +1 -1
- package/dist/suggestion/getNodeSuggestions.d.ts +1 -1
- package/dist/suggestion/getReferenceSuggestions.d.ts +1 -1
- package/dist/suggestion/getValueSuggestions.d.ts +2 -2
- package/dist/triangulum.cjs.js +35 -32
- package/dist/triangulum.es.js +337 -332
- package/dist/utils.d.ts +3 -3
- package/dist/validation/getFlowValidation.d.ts +1 -1
- package/dist/validation/getNodeValidation.d.ts +1 -1
- package/dist/validation/getValueValidation.d.ts +1 -1
- package/package.json +1 -1
package/dist/utils.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare const DEFAULT_COMPILER_OPTIONS: ts.CompilerOptions;
|
|
|
30
30
|
/**
|
|
31
31
|
* Extracts and returns common type and generic declarations from DATA_TYPES.
|
|
32
32
|
*/
|
|
33
|
-
export declare function getSharedTypeDeclarations(dataTypes
|
|
33
|
+
export declare function getSharedTypeDeclarations(dataTypes?: DataType[]): string;
|
|
34
34
|
/**
|
|
35
35
|
* Determines the type along a reference path for objects.
|
|
36
36
|
* @param value The base value to traverse.
|
|
@@ -41,11 +41,11 @@ export declare function getTypeFromReferencePath(value: any, referencePath: Refe
|
|
|
41
41
|
/**
|
|
42
42
|
* Extracts and returns the TypeScript code representation for a NodeParameter.
|
|
43
43
|
*/
|
|
44
|
-
export declare function getParameterCode(param
|
|
44
|
+
export declare function getParameterCode(param?: NodeParameter, flow?: Flow, getNodeValidation?: (flow?: Flow, node?: NodeFunction) => ValidationResult): string;
|
|
45
45
|
/**
|
|
46
46
|
* Validates if a reference is accessible from the current node's scope.
|
|
47
47
|
*/
|
|
48
|
-
export declare const validateReference: (flow
|
|
48
|
+
export declare const validateReference: (flow?: Flow, currentNode?: NodeFunction, ref?: ReferenceValue) => {
|
|
49
49
|
isValid: boolean;
|
|
50
50
|
error?: string;
|
|
51
51
|
};
|
|
@@ -3,4 +3,4 @@ import { ValidationResult } from '../utils';
|
|
|
3
3
|
/**
|
|
4
4
|
* Validates a flow by generating virtual TypeScript code and running it through the TS compiler.
|
|
5
5
|
*/
|
|
6
|
-
export declare const getFlowValidation: (flow
|
|
6
|
+
export declare const getFlowValidation: (flow?: Flow, functions?: FunctionDefinition[], dataTypes?: DataType[]) => ValidationResult;
|
|
@@ -3,4 +3,4 @@ import { ValidationResult } from '../utils';
|
|
|
3
3
|
/**
|
|
4
4
|
* Validates a single node's parameters and scope, then infers its return type.
|
|
5
5
|
*/
|
|
6
|
-
export declare const getNodeValidation: (flow
|
|
6
|
+
export declare const getNodeValidation: (flow?: Flow, node?: NodeFunction, functions?: FunctionDefinition[], dataTypes?: DataType[]) => ValidationResult;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DataType, LiteralValue } from '@code0-tech/sagittarius-graphql-types';
|
|
2
2
|
import { ValidationResult } from '../utils';
|
|
3
|
-
export declare const getValueValidation: (type
|
|
3
|
+
export declare const getValueValidation: (type?: string, value?: LiteralValue, dataTypes?: DataType[]) => ValidationResult;
|