Skip to content

Commit

Permalink
refactor out function
Browse files Browse the repository at this point in the history
  • Loading branch information
nedsalk committed Dec 17, 2024
1 parent 63a4c58 commit b6b5c2e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/abi/src/parser/specifications/v1/abi-type-mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ function mapMetadata(type: ResolvableType | ResolvedType) {
return result;
}

function isResolvedType(type: ResolvableType | ResolvedType): type is ResolvedType {
return 'typeId' in type;
}

function isResolvedConcreteType(
type: ResolvableType | ResolvedType
): type is ResolvedType & { typeId: string } {
return isResolvedType(type) && typeof type.typeId === 'string';
const isResolvedType = 'typeId' in type;

return isResolvedType && typeof type.typeId === 'string';
}

function mapComponentType(component: ResolvableComponent): AbiTypeComponent {
Expand Down

0 comments on commit b6b5c2e

Please sign in to comment.