refactor(yaml): remove schema property from DumperState (#5798)

This commit is contained in:
Tim Reichen 2024-08-24 06:55:41 +02:00 committed by GitHub
parent 23cefc3068
commit c8fe63417a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -461,7 +461,6 @@ export interface DumperStateOptions {
}
export class DumperState {
schema: Schema;
indent: number;
arrayIndent: boolean;
skipInvalid: boolean;
@ -490,7 +489,6 @@ export class DumperState {
compatMode = true,
condenseFlow = false,
}: DumperStateOptions) {
this.schema = schema;
this.indent = Math.max(1, indent);
this.arrayIndent = arrayIndent;
this.skipInvalid = skipInvalid;
@ -501,8 +499,8 @@ export class DumperState {
this.useAnchors = useAnchors;
this.compatMode = compatMode;
this.condenseFlow = condenseFlow;
this.implicitTypes = this.schema.implicitTypes;
this.explicitTypes = this.schema.explicitTypes;
this.implicitTypes = schema.implicitTypes;
this.explicitTypes = schema.explicitTypes;
}
// Note: line breaking/folding is implemented for only the folded style.