Skip to content

Commit d087b73

Browse files
committed
👍 implements getter instead of static
1 parent 14bcd03 commit d087b73

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

eval/expression.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,8 @@ export const isExpression: Predicate<Expression> = isIntersectionOf([
9696
type TemplateSubstitutions = any[];
9797

9898
class ExpressionImpl extends String implements ExpressionProps {
99-
declare [Symbol.toStringTag]: "Expression";
100-
static {
101-
this.prototype[Symbol.toStringTag] = "Expression";
99+
get [Symbol.toStringTag]() {
100+
return "Expression" as const;
102101
}
103102

104103
[vimExpressionOf](): string {

eval/string.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,8 @@ export const isRawString: Predicate<RawString> = isIntersectionOf([
129129
type TemplateSubstitutions = any[];
130130

131131
class RawStringImpl extends String implements RawStringProps {
132-
declare [Symbol.toStringTag]: "RawString";
133-
static {
134-
this.prototype[Symbol.toStringTag] = "RawString";
132+
get [Symbol.toStringTag]() {
133+
return "RawString" as const;
135134
}
136135

137136
#cached?: string;

0 commit comments

Comments
 (0)