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

Method create

contextKeyExpr/src/contextkey.ts:376–386  ·  view source on GitHub ↗
(key: string, value: any)

Source from the content-addressed store, hash-verified

374export class ContextKeyEqualsExpr implements IContextKeyExpression {
375
376 public static create(key: string, value: any): ContextKeyExpression {
377 if (typeof value === 'boolean') {
378 return (value ? ContextKeyDefinedExpr.create(key) : ContextKeyNotExpr.create(key));
379 }
380 const staticValue = STATIC_VALUES.get(key);
381 if (typeof staticValue === 'boolean') {
382 const trueValue = staticValue ? 'true' : 'false';
383 return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
384 }
385 return new ContextKeyEqualsExpr(key, value);
386 }
387
388 public readonly type = ContextKeyExprType.Equals;
389

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
createMethod · 0.45

Tested by

no test coverage detected