MCPcopy Create free account
hub / github.com/Wscats/vscode-explore / ContextKeyFalseExpr

Class ContextKeyFalseExpr

contextKeyExpr/src/contextkey.ts:245–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245export class ContextKeyFalseExpr implements IContextKeyExpression {
246 public static INSTANCE = new ContextKeyFalseExpr();
247
248 public readonly type = ContextKeyExprType.False;
249
250 protected constructor() {
251 }
252
253 public cmp(other: ContextKeyExpression): number {
254 return this.type - other.type;
255 }
256
257 public equals(other: ContextKeyExpression): boolean {
258 return (other.type === this.type);
259 }
260
261 public evaluate(context: IContext): boolean {
262 return false;
263 }
264
265 public serialize(): string {
266 return 'false';
267 }
268
269 public keys(): string[] {
270 return [];
271 }
272
273 public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
274 return this;
275 }
276
277 public negate(): ContextKeyExpression {
278 return ContextKeyTrueExpr.INSTANCE;
279 }
280}
281
282export class ContextKeyTrueExpr implements IContextKeyExpression {
283 public static INSTANCE = new ContextKeyTrueExpr();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected