Skip to content

Commit

Permalink
pr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Jan 9, 2024
1 parent 17add2b commit cc1222a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { CandidType, Record } from '../../../../../src/lib';

type Field = [string, CandidDefinition];

type RunTimeRecord = {
type RuntimeRecord = {
[key: string]: CandidType;
};

Expand Down Expand Up @@ -108,7 +108,7 @@ function generateCandidTypeObject(

function generateRuntimeCandidTypeObject(fields: Field[]): CandidType {
const azleRecordConstructorObj = fields.reduce(
(acc, [fieldName, fieldDefinition]): RunTimeRecord => {
(acc, [fieldName, fieldDefinition]): RuntimeRecord => {
return {
...acc,
[fieldName]: fieldDefinition.candidMeta.runtimeCandidTypeObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { CandidType, Variant } from '../../../../../src/lib';

type Field = [string, CandidDefinition];

type RunTimeVariant = {
type RuntimeVariant = {
[key: string]: CandidType;
};

Expand Down Expand Up @@ -132,7 +132,7 @@ function generateCandidTypeObject(

function generateRuntimeCandidTypeObject(fields: Field[]): CandidType {
const azleVariantConstructorObj = fields.reduce(
(acc, [fieldName, fieldDefinition]): RunTimeVariant => {
(acc, [fieldName, fieldDefinition]): RuntimeVariant => {
return {
...acc,
[fieldName]: fieldDefinition.candidMeta.runtimeCandidTypeObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from '../../../../src/lib';
import { SimpleCandidType } from '../candid_type';

export function candidTypeToRuntimeCandidType(
export function candidTypeToRuntimeCandidTypeObject(
candidType: SimpleCandidType
): CandidType {
if (candidType === 'blob') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fc from 'fast-check';
import { PrimitiveDefinition } from '../candid_definition_arb/types';
import { SimpleCandidType } from '../candid_type';
import { UniqueIdentifierArb } from '../../unique_identifier_arb';
import { candidTypeToRuntimeCandidType } from './candid_type_to_azle_candid_type';
import { candidTypeToRuntimeCandidTypeObject } from './candid_type_to_azle_candid_type';

export function SimpleCandidDefinitionArb(
candidType: SimpleCandidType
Expand All @@ -13,7 +13,7 @@ export function SimpleCandidDefinitionArb(
const candidTypeAnnotation = candidType;
const candidTypeObject = useTypeDeclaration ? name : candidType;
const runtimeCandidTypeObject =
candidTypeToRuntimeCandidType(candidType);
candidTypeToRuntimeCandidTypeObject(candidType);
const imports = new Set([candidType]);
const variableAliasDeclarations = generateVariableAliasDeclarations(
name,
Expand Down

0 comments on commit cc1222a

Please sign in to comment.