From a9837acc6e4a51a82b86457d01e7b054037ef37f Mon Sep 17 00:00:00 2001 From: Eno Yao <2587575267@qq.com> Date: Fri, 13 Nov 2020 21:34:36 +0800 Subject: [PATCH] Optimize code readability --- src/vs/platform/contextkey/common/contextkey.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/platform/contextkey/common/contextkey.ts b/src/vs/platform/contextkey/common/contextkey.ts index dad27b1742b62..01bef2897cedf 100644 --- a/src/vs/platform/contextkey/common/contextkey.ts +++ b/src/vs/platform/contextkey/common/contextkey.ts @@ -391,7 +391,7 @@ export class ContextKeyEqualsExpr implements IContextKeyExpression { } public serialize(): string { - return this.key + ' == \'' + this.value + '\''; + return `${this.key} == '${this.value}'`; } public keys(): string[] { @@ -460,7 +460,7 @@ export class ContextKeyInExpr implements IContextKeyExpression { } public serialize(): string { - return this.key + ' in \'' + this.valueKey + '\''; + return `${this.key} in '${this.valueKey}'`; } public keys(): string[] { @@ -578,7 +578,7 @@ export class ContextKeyNotEqualsExpr implements IContextKeyExpression { } public serialize(): string { - return this.key + ' != \'' + this.value + '\''; + return `${this.key} != '${this.value}'`; } public keys(): string[] { @@ -634,7 +634,7 @@ export class ContextKeyNotExpr implements IContextKeyExpression { } public serialize(): string { - return '!' + this.key; + return `!${this.key}`; } public keys(): string[] {