Skip to content

Commit

Permalink
Merge main into release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Dec 9, 2024
2 parents d91e660 + 41be677 commit cc0fb50
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/lifecycle/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export type LifeCycleAppTypes = {
greeting: BinaryState
times: bigint
}
maps: {}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions examples/reti/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ export type ValidatorRegistryTypes = {
numStakers: bigint
totalAlgoStaked: bigint
}
maps: {}
}
box: {
keys: {
Expand Down
2 changes: 2 additions & 0 deletions examples/state/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ export type StateAppTypes = {
int2: bigint
value: bigint
}
maps: {}
}
local: {
keys: {
Expand All @@ -319,6 +320,7 @@ export type StateAppTypes = {
localInt1: bigint
localInt2: bigint
}
maps: {}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions examples/voting/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export type VotingRoundAppTypes = {
*/
voterCount: bigint
}
maps: {}
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/client/app-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ function* keysAndMaps(
yield `${keySafe}: ${prop.valueType === 'AVMBytes' ? 'BinaryState' : getEquivalentType(prop.valueType, 'output', { app, sanitizer })}`
}
yield DecIndentAndCloseBlock
} else {
yield 'keys: {}'
}

if (maps && Object.keys(maps).length) {
Expand All @@ -286,6 +288,8 @@ function* keysAndMaps(
yield `${keySafe}: Map<${getEquivalentType(prop.keyType, 'input', { app, sanitizer })}, ${getEquivalentType(prop.valueType, 'output', { app, sanitizer })}>`
}
yield DecIndentAndCloseBlock
} else {
yield 'maps: {}'
}
}

Expand All @@ -295,7 +299,7 @@ function* appState(
): DocumentParts {
const { hasBox, hasGlobal, hasLocal } = stateFlags

if (hasLocal || hasGlobal) {
if (hasLocal || hasGlobal || hasBox) {
yield* jsDoc('Defines the shape of the state of the application.')
yield 'state: {'
yield IncIndent
Expand Down

0 comments on commit cc0fb50

Please sign in to comment.