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

Method create

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

Source from the content-addressed store, hash-verified

717export class ContextKeyLessOrEqualsExpr implements IContextKeyExpression {
718
719 public static create(key: string, value: any): ContextKeyExpression {
720 if (typeof value === 'boolean') {
721 return (value ? ContextKeyDefinedExpr.create(key) : ContextKeyNotExpr.create(key));
722 }
723 const staticValue = STATIC_VALUES.get(key);
724 if (typeof staticValue === 'boolean') {
725 const trueValue = staticValue ? 'true' : 'false';
726 return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
727 }
728 return new ContextKeyLessOrEqualsExpr(key, value);
729 }
730
731 public readonly type = ContextKeyExprType.LessOrEquals;
732

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
createMethod · 0.45

Tested by

no test coverage detected