Skip to content

Commit

Permalink
refactor: add missing returned type in getSchema function
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 committed Apr 30, 2024
1 parent 0175c4f commit 5ad3ef0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { encodeKeyName, isDynamicKeyName } from './lib/encodeKeyName';
import { ERC725Config, ERC725Options } from './types/Config';
import { Permissions } from './types/Method';
import {
DynamicNameSchema,
ERC725JSONSchema,
ERC725JSONSchemaKeyType,
ERC725JSONSchemaValueContent,
Expand Down Expand Up @@ -359,15 +360,19 @@ export class ERC725 {
getSchema(
keyOrKeys: string[],
providedSchemas?: ERC725JSONSchema[],
): Record<string, ERC725JSONSchema | null>;
): Record<string, ERC725JSONSchema | DynamicNameSchema | null>;
getSchema(
keyOrKeys: string,
providedSchemas?: ERC725JSONSchema[],
): ERC725JSONSchema | null;
): ERC725JSONSchema | DynamicNameSchema | null;
getSchema(
keyOrKeys: string | string[],
providedSchemas?: ERC725JSONSchema[],
): ERC725JSONSchema | null | Record<string, ERC725JSONSchema | null> {
):
| ERC725JSONSchema
| DynamicNameSchema
| null
| Record<string, ERC725JSONSchema | DynamicNameSchema | null> {
return getSchema(
keyOrKeys,
this.options.schemas.concat(providedSchemas || []),
Expand Down

0 comments on commit 5ad3ef0

Please sign in to comment.