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

Method create

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

Source from the content-addressed store, hash-verified

649export class ContextKeyLessExpr implements IContextKeyExpression {
650
651 public static create(key: string, value: any): ContextKeyExpression {
652 if (typeof value === 'boolean') {
653 return (value ? ContextKeyDefinedExpr.create(key) : ContextKeyNotExpr.create(key));
654 }
655 const staticValue = STATIC_VALUES.get(key);
656 if (typeof staticValue === 'boolean') {
657 const trueValue = staticValue ? 'true' : 'false';
658 return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
659 }
660 return new ContextKeyLessExpr(key, value);
661 }
662
663 public readonly type = ContextKeyExprType.Less;
664

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
createMethod · 0.45

Tested by

no test coverage detected