Skip to content

Commit

Permalink
refactor(yaml): remove schema property from DumperState (#5798)
Browse files Browse the repository at this point in the history
  • Loading branch information
timreichen authored Aug 24, 2024
1 parent 23cefc3 commit c8fe634
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions yaml/_dumper_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ export interface DumperStateOptions {
}

export class DumperState {
schema: Schema;
indent: number;
arrayIndent: boolean;
skipInvalid: boolean;
Expand Down Expand Up @@ -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;
Expand All @@ -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.
Expand Down

0 comments on commit c8fe634

Please sign in to comment.