Skip to content

Commit

Permalink
pr review, run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
connorskees committed Sep 29, 2023
1 parent 8e0bb25 commit 81cb2ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions lib/src/protofier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
CalculationOperation,
CalculationOperator,
} from './value/calculations';
import { SassMixin } from './value/mixin';
import {SassMixin} from './value/mixin';

/**
* A class that converts [Value] objects into protobufs.
Expand Down Expand Up @@ -329,7 +329,6 @@ export class Protofier {

case 'compilerMixin':
return new SassMixin(value.value.value.id);


case 'calculation':
return this.deprotofyCalculation(value.value.value);
Expand Down
10 changes: 4 additions & 6 deletions lib/src/value/mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,22 @@ import {Value} from './index';
/** A first-class SassScript mixin. */
export class SassMixin extends Value {
/**
* If this mixin is defined in the compiler, this is the unique ID that the
* compiler uses to determine which mixin it refers to.
* This is the unique ID that the compiler uses to determine which mixin it
* refers to.
*
* This is marked as public so that the protofier can access it, but it's not
* part of the package's public API and should not be accessed by user code.
* It may be renamed or removed without warning in the future.
*/
readonly id: number | undefined;
readonly id: number;

constructor(id: number) {
super();
this.id = id;
}

equals(other: Value): boolean {
return this.id === undefined
? other === this
: other instanceof SassMixin && other.id === this.id;
return other instanceof SassMixin && other.id === this.id;
}

hashCode(): number {
Expand Down

0 comments on commit 81cb2ad

Please sign in to comment.