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

Method create

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

Source from the content-addressed store, hash-verified

442export class ContextKeyNotEqualsExpr implements IContextKeyExpression {
443
444 public static create(key: string, value: any): ContextKeyExpression {
445 if (typeof value === 'boolean') {
446 if (value) {
447 return ContextKeyNotExpr.create(key);
448 }
449 return ContextKeyDefinedExpr.create(key);
450 }
451 const staticValue = STATIC_VALUES.get(key);
452 if (typeof staticValue === 'boolean') {
453 const falseValue = staticValue ? 'true' : 'false';
454 return (value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
455 }
456 return new ContextKeyNotEqualsExpr(key, value);
457 }
458
459 public readonly type = ContextKeyExprType.NotEquals;
460

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
createMethod · 0.45

Tested by

no test coverage detected