@@ -22,6 +22,7 @@ import { PropertyIdSymbol, TypeIdsSymbol } from '../constants.js';
22
22
export function EntitySchema <
23
23
T extends Record <
24
24
string ,
25
+ // biome-ignore lint/suspicious/noExplicitAny: any
25
26
( propertyId : string ) => Schema . Schema < any > | Schema . PropertySignature < any , any , any , any , any , any , any >
26
27
> ,
27
28
P extends Record < keyof T , string > ,
@@ -34,6 +35,7 @@ export function EntitySchema<
34
35
) : Schema . Struct < {
35
36
[ K in keyof T ] : ReturnType < T [ K ] > & { id : string } ;
36
37
} > {
38
+ // biome-ignore lint/suspicious/noExplicitAny: any
37
39
const properties : Record < string , Schema . Schema < any > | Schema . PropertySignature < any , any , any , any , any , any , any > > =
38
40
{ } ;
39
41
@@ -42,6 +44,7 @@ export function EntitySchema<
42
44
properties [ key ] = schemaType ( propertyId ) ;
43
45
}
44
46
47
+ // biome-ignore lint/suspicious/noExplicitAny: any
45
48
return Schema . Struct ( properties ) . pipe ( Schema . annotations ( { [ TypeIdsSymbol ] : mapping . types } ) ) as any ;
46
49
}
47
50
@@ -55,6 +58,7 @@ export function encodeToGrc20Json<T extends object, E>(schema: Schema.Schema<T,
55
58
? ( prop . type . types . find ( ( member ) => ! SchemaAST . isUndefinedKeyword ( member ) ) ?? prop . type )
56
59
: prop . type ;
57
60
const result = SchemaAST . getAnnotation < string > ( PropertyIdSymbol ) ( propType ) ;
61
+ // biome-ignore lint/suspicious/noExplicitAny: any
58
62
const propertyValue : any = ( value as any ) [ prop . name ] ;
59
63
if ( Option . isSome ( result ) && propertyValue !== undefined ) {
60
64
out [ result . value ] = propertyValue ;
@@ -83,6 +87,7 @@ export function decodeFromGrc20Json<T extends object, E>(
83
87
if ( Option . isSome ( result ) ) {
84
88
const grc20Key = result . value ;
85
89
if ( grc20Key in grc20Data && typeof prop . name === 'string' ) {
90
+ // biome-ignore lint/suspicious/noExplicitAny: any
86
91
out [ prop . name ] = ( grc20Data as any ) [ grc20Key ] ;
87
92
}
88
93
}
0 commit comments