Skip to content

Commit 576a0c0

Browse files
authored
Add toJSON to VariableType
VariableType to render with dollar prefix in json.stringify
1 parent 811bb2d commit 576a0c0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/types/VariableType.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
class VariableType {
22
constructor(public value: string) {}
3+
4+
toJSON() {
5+
return `$${this.value}`;
6+
}
37
}
48

59
export {VariableType};

0 commit comments

Comments
 (0)