Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Sass Boolean, make it a class to match spec #359

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/src/value/boolean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import {Value} from './index';
/**
* Sass boolean.
*
* Cannot be constructed; exists only as an interface and the exported
* singletons.
* This is an abstract class that cannot be directly instantiated. Instead,
* use the provided {@link sassTrue} and {@link sassFalse} singleton instances.
*/
export interface SassBoolean extends Value {
readonly value: boolean;
export abstract class SassBoolean extends Value {
abstract readonly value: boolean;
}

const trueHash = hash(true);
const falseHash = hash(false);

export class SassBooleanInternal extends Value implements SassBoolean {
export class SassBooleanInternal extends SassBoolean {
// Whether callers are allowed to construct this class. This is set to
// `false` once the two constants are constructed so that the constructor
// throws an error for future calls, in accordance with the legacy API.
Expand Down
Loading