提交 76ab4ecf 编写于 作者: A Alex Dima

Simplify requirements for IContextKeyExprMapper

上级 bf38537c
...@@ -19,10 +19,10 @@ export const enum ContextKeyExprType { ...@@ -19,10 +19,10 @@ export const enum ContextKeyExprType {
} }
export interface IContextKeyExprMapper { export interface IContextKeyExprMapper {
mapDefined(key: string): ContextKeyDefinedExpr; mapDefined(key: string): ContextKeyExpr;
mapNot(key: string): ContextKeyNotExpr; mapNot(key: string): ContextKeyExpr;
mapEquals(key: string, value: any): ContextKeyEqualsExpr; mapEquals(key: string, value: any): ContextKeyExpr;
mapNotEquals(key: string, value: any): ContextKeyNotEqualsExpr; mapNotEquals(key: string, value: any): ContextKeyExpr;
mapRegex(key: string, regexp: RegExp | null): ContextKeyRegexExpr; mapRegex(key: string, regexp: RegExp | null): ContextKeyRegexExpr;
} }
...@@ -190,7 +190,7 @@ function cmp(a: ContextKeyExpr, b: ContextKeyExpr): number { ...@@ -190,7 +190,7 @@ function cmp(a: ContextKeyExpr, b: ContextKeyExpr): number {
} }
export class ContextKeyDefinedExpr implements ContextKeyExpr { export class ContextKeyDefinedExpr implements ContextKeyExpr {
public static create(key: string): ContextKeyExpr { public static create(key: string): ContextKeyDefinedExpr {
return new ContextKeyDefinedExpr(key); return new ContextKeyDefinedExpr(key);
} }
...@@ -424,7 +424,7 @@ export class ContextKeyNotExpr implements ContextKeyExpr { ...@@ -424,7 +424,7 @@ export class ContextKeyNotExpr implements ContextKeyExpr {
export class ContextKeyRegexExpr 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); return new ContextKeyRegexExpr(key, regexp);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册