Skip to content

Commit

Permalink
Fixed uses of resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
iwoplaza committed Feb 21, 2024
1 parent 64a5477 commit cb92b0c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/customSchema/radians.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
* A schema storing radians with 2 bytes of precision.
*/
class RadiansSchema extends Schema<number> {
resolve(ctx: IRefResolver): void {
resolveReferences(ctx: IRefResolver): void {
// No inner references to resolve
}

Expand Down
2 changes: 1 addition & 1 deletion src/structure/array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ArraySchema<TElement extends AnySchema> extends Schema<
this.elementSchema = _unstableElementSchema;
}

resolve(ctx: IRefResolver): void {
resolveReferences(ctx: IRefResolver): void {
this.elementSchema = ctx.resolve(this._unstableElementSchema);
}

Expand Down
2 changes: 1 addition & 1 deletion src/structure/dynamicArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class DynamicArraySchema<TElement extends AnySchema> extends Schema<
this.elementType = _unstableElementType;
}

resolve(ctx: IRefResolver): void {
resolveReferences(ctx: IRefResolver): void {
this.elementType = ctx.resolve(this._unstableElementType);
}

Expand Down
6 changes: 3 additions & 3 deletions src/structure/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class ObjectSchema<TProps extends Record<string, AnySchema>>
this.properties = _properties;
}

resolve(ctx: IRefResolver): void {
resolveReferences(ctx: IRefResolver): void {
this.properties = resolveMap(ctx, this._properties);
}

Expand Down Expand Up @@ -145,8 +145,8 @@ export class GenericObjectSchema<
this.subTypeMap = _subTypeMap;
}

resolve(ctx: IRefResolver): void {
this._baseObject.resolve(ctx);
resolveReferences(ctx: IRefResolver): void {
this._baseObject.resolveReferences(ctx);
this.subTypeMap = resolveMap(ctx, this._subTypeMap);
}

Expand Down
2 changes: 1 addition & 1 deletion src/structure/optional.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class OptionalSchema<TInner extends AnySchema> extends Schema<
this.innerSchema = _innerUnstableSchema;
}

resolve(ctx: IRefResolver): void {
resolveReferences(ctx: IRefResolver): void {
this.innerSchema = ctx.resolve(this._innerUnstableSchema);
}

Expand Down
2 changes: 1 addition & 1 deletion src/structure/tuple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class TupleSchema<
this.schemas = _unstableSchemas;
}

resolve(ctx: IRefResolver): void {
resolveReferences(ctx: IRefResolver): void {
this.schemas = resolveArray(ctx, this._unstableSchemas);
}

Expand Down

0 comments on commit cb92b0c

Please sign in to comment.