From 76ab4ecfcba075027cf10db4d80f9e6db3fff029 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 29 Jul 2019 14:22:18 +0200 Subject: [PATCH] Simplify requirements for IContextKeyExprMapper --- src/vs/platform/contextkey/common/contextkey.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/platform/contextkey/common/contextkey.ts b/src/vs/platform/contextkey/common/contextkey.ts index 8c01c1452d8..64025a4249f 100644 --- a/src/vs/platform/contextkey/common/contextkey.ts +++ b/src/vs/platform/contextkey/common/contextkey.ts @@ -19,10 +19,10 @@ export const enum ContextKeyExprType { } export interface IContextKeyExprMapper { - mapDefined(key: string): ContextKeyDefinedExpr; - mapNot(key: string): ContextKeyNotExpr; - mapEquals(key: string, value: any): ContextKeyEqualsExpr; - mapNotEquals(key: string, value: any): ContextKeyNotEqualsExpr; + mapDefined(key: string): ContextKeyExpr; + mapNot(key: string): ContextKeyExpr; + mapEquals(key: string, value: any): ContextKeyExpr; + mapNotEquals(key: string, value: any): ContextKeyExpr; mapRegex(key: string, regexp: RegExp | null): ContextKeyRegexExpr; } @@ -190,7 +190,7 @@ function cmp(a: ContextKeyExpr, b: ContextKeyExpr): number { } export class ContextKeyDefinedExpr implements ContextKeyExpr { - public static create(key: string): ContextKeyExpr { + public static create(key: string): ContextKeyDefinedExpr { return new ContextKeyDefinedExpr(key); } @@ -424,7 +424,7 @@ export class ContextKeyNotExpr implements ContextKeyExpr { export class ContextKeyRegexExpr implements ContextKeyExpr { - public static create(key: string, regexp: RegExp | null): ContextKeyExpr { + public static create(key: string, regexp: RegExp | null): ContextKeyRegexExpr { return new ContextKeyRegexExpr(key, regexp); } -- GitLab